2

実行可能ファイルのリリースバージョンをリンクしようとすると、たくさんのリンクエラーが発生します(デバッグバージョンには同じ問題はありません)。リンクのコマンドラインを比較しても、問題は発生しません。エラーには大きく2種類あり、どちらも処理できません。

最初の種類は、未解決の外部シンボル_ declspec(dllimport)について文句を言います例として:エラーLNK2019:未解決の外部シンボル " _declspec(dllimport)public:__thiscall stlpd_std :: basic_string、class stlpd_std :: allocator> :: basic_string、class stlpd_std: :allocator>(class stlpd_std :: basic_string、class stlpd_std :: allocator> const&) "(_ imp ?? 0?$ basic_string @ DV?$ char_traits @ D @ stlpd_std @@ V?$ allocator @ D @ 2 @@ stlpd_std @@ QAE @ ABV01 @@ Z)関数 "public:__thiscall Springfield :: generic :: runtime_error :: runtime_error(class stlpd_std :: basic_string、class stlpd_std :: allocator> const&)"(?? 0runtime_error @ generic @ Springfield @@ QAE @ ABV?$ basic_string @ DV?$ char_traits @ D @ stlpd_std @@ V?$ allocator @ D @ 2 @@ stlpd_std @@@ Z)

より人間が読めるバージョンの場合(すべての文字列を置き換える):エラーLNK2019:未解決の外部シンボル "__declspec(dllimport)public:__thiscall string :: basic_string、class stlpd_std :: allocator>(class string const&)"(_ imp ?? 0?$ basic_string @ DV?$ char_traits @ D @ stlpd_std @@ V?$ allocator @ D @ 2 @@ stlpd_std @@ QAE @ ABV01 @@ Z)関数 "public:__thiscall Springfield :: generic :: runtime_error: :runtime_error(class string const&) "(?? 0runtime_error @ generic @ Springfield @@ QAE @ ABV?$ basic_string @ DV?$ char_traits @ D @ stlpd_std @@ V?$ allocator @ D @ 2 @@ stlpd_std @@@ Z

sceondクラスのエラーは、未解決の外部シンボル__CrtDbgReportWについて文句を言います。

これに対処する上で、何らかの洞察を得ることができればと思います。

4

2 に答える 2

2

エラーから、リンクされたライブラリの1つとしてCRTを含めていないようです。Visual Studio2005で提供されているさまざまなCRTライブラリへのリンクを次に示します。最も適切なものを選択し、リンク先のライブラリのリストに含まれていることを確認してください。

于 2010-09-24T00:21:30.210 に答える
1

デバッグ設定を使用してビルドされたファイルが含まれているか、ランタイムライブラリ(DLLと静的)が混在しているようです。

于 2010-09-24T00:44:59.280 に答える