归档问题,不是在C中被链接的体系结构(x86_64) [英] Issue with archive which is not the architecture being linked (x86_64) in C
问题描述
当我尝试在该程序上运行make时,会收到以下警告:
When I run make on this program I am trying to build, I get these warnings:
ld: warning: ignoring file ../lib/libiptools.a, file was built for archive which is not the architecture being linked (x86_64)
ld: warning: ignoring file ../lib/libmpeg.a, file was built for archive which is not the architecture being linked (x86_64)
然后显然无法使用以下命令进行编译:
And then it obviously fails to compile with this:
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [iptool] Error 1
由于我不熟悉存档,因此我很难弄清楚如何更改我的make文件并为此正确地进行编译.感谢我提供任何建议,因为我确信我缺少一些简单的东西.我正在使用Mac OS X Mountain Lion.
I am just having a hard time figuring out how to alter my make file and compile properly for this as I am unfamiliar with archives. Any advice is appreciate since I am sure I am missing something simple. I am using Mac OS X Mountain Lion.
推荐答案
libiptools.a和libmpeg.a是针对32位编译的,而项目的其余部分则针对64位编译.查找这些库的64位版本,或针对32位进行编译.
libiptools.a and libmpeg.a are compiled for 32-bit, but the rest of your project is compiled for 64-bit. Either find 64-bit versions of those libraries, or compile for 32-bit.
这篇关于归档问题,不是在C中被链接的体系结构(x86_64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!