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