_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 MATLAB动图的问题
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名