我有一個大型現有的Xcode項目,現在我想添加犰狳庫到它。鏈接犰狳與Xcode
我已經下載了它(與MacPorts的),並得到了它使用cmake(就像C++端APP)工作。我沒有將Cmake用於我的大型項目(iPad應用程序),因此我試圖鏈接庫。我查看了與cmake一起工作的xcode-project文件,並將其添加到我的項目中。
補充: 頭搜索路徑中:/ opt /本地/包括 庫搜索路徑中:/ opt/local/lib目錄 其他連接標誌:-larmadillo
我還添加了libarmadillo.3.4.0.dylib到「鏈接庫與二進制文件」
ld: warning: ld: warning: ignoring file /opt/local/lib/libarmadillo.3.4.0.dylib, file was built for unsupported file format (0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0) which is not the architecture being linked (armv7s): /opt/local/lib/libarmadillo.3.4.0.dylibld: warning: ignoring file /opt/local/lib/libarmadillo.dylib, file was built for unsupported file format (0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0) which is not the architecture being linked (armv7s): /opt/local/lib/libarmadillo.dylib
ignoring file /opt/local/lib/libz.dylib, file was built for unsupported file format (0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0) which is not the architecture being linked (armv7s): /opt/local/lib/libz.dylib
Undefined symbols for architecture armv7s:
"_deflateInit_", referenced from:
_compress_data in libTestFlight.a(tf_compression.o)
"_deflateEnd", referenced from:
_compress_data in libTestFlight.a(tf_compression.o)
"_deflate", referenced from:
_compress_data in libTestFlight.a(tf_compression.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
任何想法我可以解決這個問題?
Daniel,ge stackarnrätt – TompaLompa
我試圖安裝犰狳,並添加了標題和庫搜索路徑,以及'其他鏈接器標誌'。我不知道如何將libarmadillo.3.4.0.dylib添加到「鏈接庫與二進制文件」,雖然。誰能幫忙? – tiswas