简体   繁体   English

文件是为i386构建的,而不是在Mac OSX 10.6上为iOS 4.2编译OpenCV2.2时所链接的架构(x86_64)

[英]file was built for i386 which is not the architecture being linked (x86_64) while compiling OpenCV2.2 for iOS 4.2 on Mac OSX 10.6

I have been following the simple guide at http://www.atinfinity.info/wiki/index.php?OpenCV/Using%20OpenCV%202.2%20on%20iOS%20SDK%204.2 (which uses the older guide I've also read at http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en ) to get OpenCV2.2 compiled to work on iOS 4.2. 我一直在关注http://www.atinfinity.info/wiki/index.php?OpenCV/Using%20OpenCV%202.2%20on%20iOS%20SDK%204.2上的简单指南(使用旧指南我也读过在http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en )将OpenCV2.2编译为在iOS 4.2上运行。 Everything went smoothly until I tried to build. 一切顺利,直到我试图建立。 When I run the following: 当我运行以下内容时:

lc:opencv_simulator leonard$ ../opencv_cmake.sh Simulator ../../OpenCV-2.2.0/

I get the following error: 我收到以下错误:

ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libSystem.dylib,
  file was built for i386 which is not the architecture being linked (x86_64)

This is using (among other settings, obviously): 这是使用(显然在其他设置中):

-D CMAKE_OSX_ARCHITECTURES="i386"

I read that on OSX 10.6 i386 is seen as the default, so it uses the system default (but that is x86_64). 我在OSX 10.6上看到i386被视为默认值,因此它使用系统默认值(但这是x86_64)。 I also read I could use: 我也读过我可以用的:

export CFLAGS=-m32
export CPPFLAGS=-m32

But this doesn't work either. 但这也不起作用。

Any ideas? 有任何想法吗?

用于构建特定体系结构的gcc标志是-march

gcc -march=i386 ...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C程序(在OS X中) - 为归档而构建的文件不是被链接的体系结构(x86_64) - C Program (in OS X) - file was built for archive which is not the architecture being linked (x86_64) 忽略文件lib.a,该文件是为归档而构建的,而不是要链接的体系结构(x86_64) - ignoring file lib.a, file was built for archive which is not the architecture being linked (x86_64) 错误:文件是为不受支持的文件格式构建的,这不是正在链接的体系结构 (x86_64) - Error: file was built for unsupported file format which is not the architecture being linked (x86_64) CMake; 386:x86-64 输入文件架构 (..) 与 i386 不兼容 output - CMake; 386:x86-64 architecture of input file (.. ) is incompatible with i386 output 链接问题:i386:x86-64输入文件架构* .o与i386输出不兼容 - linking problem: i386:x86-64 architecture of input file *.o is incompatible with i386 output GCC:输入文件“ ../window.ui.o”的i386体系结构与i386:x86-64输出不兼容 - GCC: i386 architecture of input file `../window.ui.o' is incompatible with i386:x86-64 output C - 在Mac OSX Lion上编译时,架构x86_64的未定义符号 - C - Undefined symbols for architecture x86_64 when compiling on Mac OSX Lion 归档问题,而不是在C中链接的架构(x86_64) - Issue with archive which is not the architecture being linked (x86_64) in C c ) 出错和链接问题:输入文件的 i386:x86-64 架构,与 i386 不兼容 output - c )make error& link problem: i386:x86-64 architecture of input file, incompatible with i386 output 从i386移动到x86_64时的浮点精度 - Floating-point precision when moving from i386 to x86_64
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM