_IronMan 2017-09-17 12:15 采纳率: 0%
浏览 1063
已结题

使用autotools自动生成Makefile时在make这一步骤出错

$ ** make**
cd . && /bin/bash ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
make all-am
make[1]: Entering directory '/home/zhang/hello'
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.o -MD -MP -MF .deps/hello.Tpo -c -o hello.o hello.c
mv -f .deps/hello.Tpo .deps/hello.Po
gcc -g -O2 -o hello hello.o

hello.o:在函数‘main’中:
/home/zhang/hello/hello.c:6:对‘hello_str’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:369: recipe for target 'hello' failed
make[1]: *** [hello] Error 1
make[1]: Leaving directory '/home/zhang/hello'
Makefile:273: recipe for target 'all' failed
make: *** [all] Error 2

我的三个源文件是:hello.c / common.c / common.h

问题好像显示文件之间不能建立链接,才会出现函数未定义的问题。但自己试了很多次都无果,故求助各位大虾,谢谢!

  • 写回答

1条回答

  • devmiao 2017-09-17 14:51
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作