1

プロジェクトで使用しようとしていますboost::filesystemが、リンカー エラーが発生しました。

Error   14  error LNK1169: one or more multiply defined symbols found   C:\Users\Developer\Desktop\mandala3d\Debug\mandala.exe  1   1   mandala
Error   5   error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in MSVCRTD.lib(MSVCR110D.dll)    C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   4   error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z) already defined in MSVCRTD.lib(MSVCR110D.dll)  C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   12  error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMT.lib(stdexcpt.obj) C:\Users\Developer\Desktop\mandala3d\mandala\MSVCRTD.lib(MSVCR110D.dll) mandala
Error   6   error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in MSVCRTD.lib(MSVCR110D.dll)  C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   7   error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in MSVCRTD.lib(MSVCR110D.dll)    C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   8   error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in MSVCRTD.lib(MSVCR110D.dll)  C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   9   error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in MSVCRTD.lib(MSVCR110D.dll)   C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(stdexcpt.obj)   mandala
Error   13  error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) already defined in LIBCMT.lib(stdexcpt.obj)   C:\Users\Developer\Desktop\mandala3d\mandala\MSVCRTD.lib(MSVCR110D.dll) mandala
Error   10  error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR110D.dll)    C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(invarg.obj) mandala
Error   11  error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR110D.dll)    C:\Users\Developer\Desktop\mandala3d\mandala\LIBCMT.lib(invarg.obj) mandala

次のコマンドでブーストを構築しています。

bootstrap
.\b2

そして、私はライブラリのインクルードディレクトリを指しています.$BOOSTDIR\stage\lib私のコンパイラはVisual Studio 2012 (v110).

debugディレクトリで生成されたライブラリを直接リンクしようとしました$BOOSTDIR\lib\*が、他のエラーが発生しました。また、ライブラリを静的にリンクするための標準的または意図された方法ではないのではないかと思います。

ここで何が間違っていますか?

4

1 に答える 1