既存の大規模な Xcode プロジェクトがあり、armadillo ライブラリをそれに追加したいと考えています。
私はそれを(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)
これを解決する方法はありますか?