【问题标题】:add in a Makefile.in a -DVARIABLE linux在 -DVARIABLE linux 中添加 Makefile.in
【发布时间】:2012-09-26 11:36:27
【问题描述】:

我正在尝试制作我拥有的 configure.ac + Makefile.in 文件。在制作之前一切都很好:

这里有:

usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 12
4-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status

为什么?

在我的 Makefile.am 中,我确实包含了:AM_CFLAGS = -DMAIN=1

我做错了什么?

谢谢

问题已解决 我已将 AM_CFLAGS 替换为 FILE_NAME_CFLAGS!!

【问题讨论】:

  • 正如@leigh 指出的那样,您应该投票赞成您喜欢的答案,并“接受”正确的答案。

标签: c autoconf automake libtool gnu-make


【解决方案1】:

问题解决了。
我已将AM_CFLAGS 替换为FILE_NAME_CFLAGS

【讨论】:

  • 实际上你应该使用 FILE_NAME_CPPFLAGS (因为定义是预处理器而不是编译器的标志)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-12-23
  • 2010-10-09
  • 2017-06-06
  • 2014-01-30
  • 1970-01-01
  • 1970-01-01
  • 2012-06-25
相关资源
最近更新 更多