1

Visual C++ 2005 を使用して、いくつかのライブラリと実行可能ファイルをビルドしています。ライブラリの追加インクルード パスに STLport の場所を含め、実行可能ファイルのリンカーへの入力にライブラリを含めます。

ただし、ライブラリは stl ポート名前空間なしで stl シンボル (文字列など) を参照しているようです。これにより、リンカー エラーが発生します。

これらは、2 つのライブラリと実行可能ファイルのコマンド ラインからの関連行です。

/Od /I "..\Junctions\fo_fid_3rdParty\STLport-5.1.0\stlport"

/Od /I "..\Junctions\Includes\fo_fid_3rdParty\STLport-5.1.0\stlport"

/OUT:"..\ET_BUILD\vc8\Debug\bin\SFGWDealerwebFixAutorecD.exe" /INCREMENTAL:NO /NOLOGO 
..\junctions\libs\fo_fid_3rdParty\STLport-5.1.0\lib\stlportstld_vc8.5.1.lib 

エラーの例を次に示します。エラー 7 エラー LNK2001: 未解決の外部シンボル "public: virtual bool __thiscall Springfield::CClientFramework::ProviderRequest(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &)" (?ProviderRequest@CClientFramework@Springfield@@UAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2 @@std@@00@Z) FixAutorec.lib

このシンボル Springfield::CClientFramework::ProviderRequest は、ライブラリ ClientArchitecture.lib に由来します これは、dumpbin.exe がこのシンボルを表示する方法です: (public: virtual bool __thiscall Springfield::CClientFramework::ProviderRequest(class stlpd_std::basic_string,class stlpd_std::アロケータ > const &,class stlpd_std::basic_string,class stlpd_std::allocator > const &,class Springfield::IDataStoreNode const *))

探しているシンボルがその文字列 std::basic_string を定義していることに注意してください。一方、宛先はシンボルを stlpd_std::basic_string として定義します。

ありがとう

4

0 に答える 0