未解決のシンボル エラーが何であるかは理解していますが、この特定のライブラリでこの特定の状況でエラーが発生する理由がわかりません。これがエラーの出力です。
Undefined symbols for architecture x86_64:
"soci::soci_error::soci_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
soci::type_conversion<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void>::from_base(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, soci::indicator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in Inspector.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
次のリンク フラグを使用していることに注意してください。
-L/usr/local/lib -lsoci_core -lsoci_postgresql -lpq -ldl
soci::session
他のシンボル (コンストラクターやデストラクタなど)への参照が解決されていることにも注意してください。
私は何を間違っていますか?リンクする必要がある別のソーシャルライブラリはありますか?
編集:私はMac OS Xで作業しており、自作(経由brew install soci --with-pg
)によるインストールと、3.2.2および3.2.1のスタンドアロンインストールの両方を試したことに注意してください。