1
我编译的代码已经通过macports安装了opencv。但是,在运行我的生成文件时,我得到了在macports上用opencv编译代码
ld: warning: in /opt/local/lib/libopencv_core.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_imgproc.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_highgui.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_ml.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_video.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_features2d.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_calib3d.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_objdetect.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_contrib.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_legacy.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libopencv_flann.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
这是否意味着这些库都没有链接?我能做些什么呢?
奥普斯我想我知道什么是错的。在我的上层通用make文件中,有这两行:CFLAGS + = -arch i386 -arch x86_64 LDFLAGS + = -arch i386 -arch x86_64我删除了-arch i386 for both and it worked。谢谢! – 2011-06-16 18:42:03