mingw-w64 (4.8.0) + cmake を使用して、yaml-cpp (0.5.1) の共有ライブラリを構築しています。プロジェクトには、付属の CMakeLists.txt にいくつかのビルド ターゲットがあります。メイン ライブラリと、ライブラリをリンクするyaml-cpp
などのテスト プログラムです。parse
ライブラリ ターゲット自体はエラーなしでビルドされましたが、ビルドyaml-cpp
時に次のエラーが続きます。parse
Linking CXX executable parse.exe
CMakeFiles\parse.dir/objects.a(parse.cpp.obj):parse.cpp:(.text+0x1a3): undefined reference to `YAML::Load(std::istream&)'
CMakeFiles\parse.dir/objects.a(parse.cpp.obj):parse.cpp:(.text+0x1b2): undefined reference to `YAML::operator<<(std::ostream&, YAML::Node const&)'
c:/work/mingw64-4.8/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\parse.dir/objects.a(parse.cpp.obj): bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
util\CMakeFiles\parse.dir\build.make:90: recipe for target 'util/parse.exe' failed
mingw32-make[3]: *** [util/parse.exe] Error 1
CMakeFiles\Makefile2:228: recipe for target 'util/CMakeFiles/parse.dir/all' failed
mingw32-make[2]: *** [util/CMakeFiles/parse.dir/all] Error 2
CMakeFiles\Makefile2:240: recipe for target 'util/CMakeFiles/parse.dir/rule' failed
mingw32-make[1]: *** [util/CMakeFiles/parse.dir/rule] Error 2
makefile:211: recipe for target 'parse' failed
mingw32-make: *** [parse] Error 2
ライブラリを使用して小さなテスト プログラムを作成しようとすると、同様のエラーが発生しますが、何が問題なのかわかりません。ここで何が問題になる可能性がありますか?