我得到以下错误,而在OS建立的OpenCV X 10.5(英特尔):

ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture
ld: warning in .libs/_cv_la-error.o, file is not of required architecture
ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture
ld: warning in .libs/_cv_la-cvshadow.o, file is not of required architecture
ld: warning in ../../../cv/src/.libs/libcv.dylib, file is not of required architecture
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libcxcore.dylib, file is not of required architecture
Undefined symbols for architecture i386:
"_fputs$UNIX2003", referenced from:
  _PySwigObject_print in _cv_la-_cv.o
  _PySwigPacked_print in _cv_la-_cv.o
  _PySwigPacked_print in _cv_la-_cv.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/Sr/Srq9N4R8Hr82xeFvW3o-uk+++TI/-Tmp-//cchT0WVX.out (No such file or directory)
make[4]: *** [_cv.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

虽然运行./configure --without-蟒一切正常。另一个奇怪的是,当我使用的Python 2.4.5或2.5.1一切都已经建立好了,这个问题转换到Python框架2.5.2

发生后
有帮助吗?

解决方案 3

好的,我种工作了

它需要与来自MacPorts的或任何蟒编译。然后,我需要运行/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5(这是我以前的Python版本),并有OpenCV的只是工作。

其他提示

这似乎有点不可思议,它正在寻找/Developer/SDKs/MacOSX10.4u.sdk警告时,对不同的架构,同时链接 - 你能不能给我们介绍一下你的编译环境的一些更详细(的XCode,GCC,Python版本,$ PATH等)

另外,不会将任何OpenCV的二进制文件可用的工作适合你?

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib仅仅是一个到/ usr /本地/ lib下链路 删除文件导致我得到的警告后:

ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture
ld: warning in .libs/_cv_la-error.o, file is not of required architecture
ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture
ld: warning in .libs/_cv_la-cvshadow.o, file is not of required architecture
ld: warning in ../../../cv/src/.libs/libcv.dylib, file is not of required architecture
ld: warning in /Users/Pietras/opencv/cxcore/src/.libs/libcxcore.dylib, file is not of required architecture
Undefined symbols for architecture i386: ... `

和这些文件是由化妆创建。

GCC:i686的-苹果darwin9-GCC-4.0.1

$ PATH:

/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/AVRMacPack/bin:/usr/X11R6/bin

的XCode 3(最新)

的Python 2.5.1(R251:54869,2007年4月18日,22点08分04秒) - MacPython上从python.org (试图降级,并使用它,而不是2.5.2,但不工作了......)

which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python

我没有找到OS X.任何的Python OpenCV的二进制文件 我试图使它同时从MacPorts的默认设置的python2.4或2.5,并编译和安装,但是当我尝试导入存在总线错误或没有初始化致命的Python解释器错误(版本不匹配?)  和它退出。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top