请教 undefined reference to的问题

raylin 2009-07-14 05:36:52
我编译成功了libfaad.a,把这个文件和libfaad下面include目录的2个头文件拷贝到ffmpeg下面,./config -enable-libfaad等成功,但是在进入libavcodec目录,并执行make命令时,在生成libfaad.o之后,连接时出现下面的错误:
/ffmpegwm5/libavcodec/libfaad.c:316: undefined reference to `NeAACDecClose'
/ffmpegwm5/libavcodec/libfaad.c:316: undefined reference to `NeAACDecOpen'

而这两个函数我都在libfaad.a上能找到符号的,请问各位大虾知不知道怎么回事? 谢谢。
...全文
8013 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
hcu5555 2012-10-25
  • 打赏
  • 举报
回复
很有可能是你的函数名两个不一样。。。呵呵
shance3c 2012-10-07
  • 打赏
  • 举报
回复
我也有类似的问题需要解决
xiaohang00 2011-04-06
  • 打赏
  • 举报
回复
我也有这样的问题,是不是makefile要修改啊?我是引用外部变量出问题的
hrx1989 2011-03-21
  • 打赏
  • 举报
回复
我也遇上这种问题了,但是招了好多方法都不对。。。。
求解答!!
  • 打赏
  • 举报
回复
思路是对的,就是没有相关的模块或包,如果找到之前漏掉的地方完善了就好了,受你们启发我的问题解决了,编译httpd 之前的apr-util编译少包,apr-util 完整编译后,httpd make就过了
raylin 2009-07-16
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 ShowMan 的回复:]
The fix was to rename the FFMPEG pkgconfig files (avcodec.pc and avutil.pc and all the other av*.pc files) in /usr/lib/pkgconfig so that xine-lib 's configure couldn't find them. This would make xine-lib's configure use its own internal FFMPEG - this made the above linker error go away. Yay!
[/Quote]
这个我在网上也搜索到啊.
现在还没解决到这个问题我把FAAD用编译器(arm-wince-mingw32ce-gcc)编译正常,但是MAKE的时候,出现了这样的错误:
o ../libfaad/.libs/libfaad.a ../common/mp4ff/libmp4ff.a
main.o: In function `decodeMP4file':
/ffmpegwm5/faad2-2.7/frontend/main.c:778: undefined reference to `mp4ff_open_rea
d'
main.o: In function `GetAACTrack':
/ffmpegwm5/faad2-2.7/frontend/main.c:680: undefined reference to `mp4ff_total_tr
acks'
/ffmpegwm5/faad2-2.7/frontend/main.c:874: undefined reference to `mp4ff_num_samp
les'
/ffmpegwm5/faad2-2.7/frontend/main.c:887: undefined reference to `mp4ff_get_samp
le_duration'
/ffmpegwm5/faad2-2.7/frontend/main.c:888: undefined reference to `mp4ff_read_sam
ple'
/ffmpegwm5/faad2-2.7/frontend/main.c:1003: undefined reference to `mp4ff_close'
/ffmpegwm5/faad2-2.7/frontend/main.c:979: undefined reference to `SetConsoleTitl
eW'
/ffmpegwm5/faad2-2.7/frontend/main.c:961: undefined reference to `mp4ff_close'
main.o: In function `decodeAACfile':
/ffmpegwm5/faad2-2.7/frontend/main.c:640: undefined reference to `SetConsoleTitl
eW'
raylin 2009-07-16
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 ecsape 的回复:]
可以修改下Makefile,一般都有一个libs= 。。。的变量,把libfaad.a添加进去。不知道你编译的是什么,只能这样猜测下了,你试试吧。
[/Quote]
我昨天加进去了,还是不行,我怀疑是编译器不一样导致的,现在改用一样的编译器,可惜出错.
raylin 2009-07-15
  • 打赏
  • 举报
回复
急死人啊,高手们回答一个啊。
xxxxxtt 2009-07-15
  • 打赏
  • 举报
回复
把#include "xxx.h"改为 #include "xxx.c"
猫大技师 2009-07-15
  • 打赏
  • 举报
回复
下周才进入linux领域,帮不了你了。
ShowMan 2009-07-15
  • 打赏
  • 举报
回复
The fix was to rename the FFMPEG pkgconfig files (avcodec.pc and avutil.pc and all the other av*.pc files) in /usr/lib/pkgconfig so that xine-lib 's configure couldn't find them. This would make xine-lib's configure use its own internal FFMPEG - this made the above linker error go away. Yay!
ecsape 2009-07-15
  • 打赏
  • 举报
回复
可以修改下Makefile,一般都有一个libs= 。。。的变量,把libfaad.a添加进去。不知道你编译的是什么,只能这样猜测下了,你试试吧。
raylin 2009-07-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 yhf365 的回复:]
不知道怎么回事,
把libfaad的源码直接copy到libfaad.c中不知行不行
[/Quote]
libfaad目录的源码?
我觉得有可能是因为找不到库的原因,不知道在MAKEFILE文件里面怎么样指定.a库的? 谢谢。
yhf365 2009-07-14
  • 打赏
  • 举报
回复
不知道怎么回事,
把libfaad的源码直接copy到libfaad.c中不知行不行
raylin 2009-07-14
  • 打赏
  • 举报
回复
顶顶更健康。

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧