- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我应该如何处理这些文件 ename.c.inc
, error_functions.c
, error_functions.h
, tlpi_hdr.h
?
我将这些文件复制到/lib/目录中。但是当我尝试编译示例 list 4.1(一个简单的复制函数)时,出现以下错误:
4.1_copy.c:(.text+0x7e): undefined reference to `usageErr'
4.1_copy.c:(.text+0xcd): undefined reference to `errExit'
4.1_copy.c:(.text+0x139): undefined reference to `errExit'
4.1_copy.c:(.text+0x16f): undefined reference to `fatal'
4.1_copy.c:(.text+0x1b6): undefined reference to `errExit'
4.1_copy.c:(.text+0x1d7): undefined reference to `errExit'
4.1_copy.c:(.text+0x1f8): undefined reference to `errExit'
collect2: ld returned 1 exit status
我需要做什么才能链接到这个程序?
最佳答案
编译时,尝试添加需要包含在copy.c中的文件的路径,如下所示:
gcc -I ../lib -o copy copy.c
该 -I 参数后跟路径,告诉编译器在该路径中搜索包含的文件,希望包括 tlpi_hdr.h。
或者,按照 this page 最底部的说明进行操作并从 copy.c 结束的目录运行 make
。
关于c - 如何编译 Michael Kerrisk 所著《 "The Linux Programming Interface"》一书中的示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26523483/
我正在尝试理解/运行 Michael Neilsen 的神经网络和深度学习第 2 章中关于反向传播的代码:http://neuralnetworksanddeeplearning.com/chap2.
我正在尝试建立一个学习 mnist 数字的网络,正如 Michael Nielsen 在他的书 (http://neuralnetworksanddeeplearning.com/chap1.html
这是我在使用 bundle exec rspec spec/requests/static_pages_spec.rb 时遇到的错误。 我已经包含了 gem 测试单元。 请帮助我,我是 Rails 的
我正在研究 Michael & Scott 的无锁队列算法,并尝试用 C++ 实现它。 但是我在代码中产生了竞争,并且认为算法中可能存在竞争。 我在这里阅读了这篇论文: Simple, Fast, a
我在尝试实现 Hartl 的 Ruby on Rails 教程中的示例应用程序时遇到了一个奇怪的问题。 当我删除微博时,会发生以下情况: 微博被删除。 用户也会被删除。 定向至“注册”页面。 只应该发
我尝试使用 Google 网站管理员工具重新抓取网站,但没有成功。 有谁知道为什么 Google 上的链接可能会显示“halalgems.com”,但会重定向到另一个网站? 描述也不正确。 最佳答案
阅读 Hartl 的教程,地址为 list 10.42 在 microposts Controller 中,我们有 def create @micropost = current_user
我已经完成了本教程,但自第 7 节制作注册表单以来,我在 CSS 渲染方面遇到了一些小问题。这就是我得到的: 它应该是这样的: 这是相关的 CSS: @mixin box_sizing { -mo
我正在关注 Michael Hartl 教程并在 Listing 10.14 之后,他说 There is one subtlety, though: on failed micropost subm
我正在写关于我在完成 Michael Hartl 的 Ruby on Rails 教程时遇到的问题。问题是 css 不会更改用于密码确认的输入字段的外观。所有其他输入字段的外观都受 css 规则的影响
我正在编写 Michael Hartl 的教程。我在第 6 章。我要进行用户验证。下面的代码是我被告知要使用的代码,但它不起作用。我收到错误消息 syntax error, unexpected en
我正在使用 libcds他们实现了 Michael Hash Map 和 Split order list。 根据我从文档中收集到的信息,我是如何实现它们的: 包括: #include #inclu
我正在学习 Michael Hartl 的 Ruby on Rails 教程,我在 third exercise of chapter 5 方面遇到了一些麻烦.我已经创建了 application_h
我没有从 Hartl 的 Rails 教程中得到以下练习的答案: By replacing the question marks in Listing 4.10 with the appropriat
我在第五章的最后做练习。我应该测试链接是否转到正确的页面。这是我的测试代码。 require 'spec_helper' describe "LayoutLinks" do it "shoul
我正在学习 Michael Hartl 的 Ruby On Rails 3 教程,并使用 Capybara 进行集成规范。到目前为止的集成规范如下 require 'spec_helper' desc
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
在本教程的第 10 章中,我正在更改微博的 CSS 以使其看起来不同。但是它们不会在我的本地服务器上更新。我尝试重新启动服务器并重置并重新填充数据库,但仍然没有成功。为什么会这样? 自定义 CSS 文
示例代码: assert_select 'div#' assert_select 'div.' 这会产生:弃用警告:由于无效的 css 选择器,断言未运行。 ] 16% 时间:00:00:01,预计到
我正在学习 Hartl 的 Ruby 教程。我在第5章的开头。 说明是通过 添加图像('rails.png') 主页:app/views/static_pages/home.html.e
我是一名优秀的程序员,十分优秀!