我有一个现有的大型 Xcode 项目,现在我想将犰狳库添加到它。
我已经下载了它(使用 macports)并使用 Cmake(就像一个 C++ 终端应用程序)让它工作。我没有在我的大型项目(iPad 应用程序)中使用 Cmake,所以我尝试链接库。我查看了使用 cmake 工作的 xcode-project 文件,并将其添加到我的项目中。
添加:头文件搜索路径:/opt/local/include 库搜索路径:/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)
有什么想法可以解决这个问题吗?