如何确保您正在针对 STLport 进行构建

发布于 2024-08-31 00:28:29 字数 1436 浏览 4 评论 0原文

我正在使用 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::allocator > const &,class stlpd_std::basic_string,class stlpd_std::allocator > const &,class Springfield ::IDataStoreNode const *))

请注意,正在查找的符号定义了其字符串 std::basic_string。 而目标将符号定义为 stlpd_std::basic_string。

谢谢

I am using Visual C++ 2005 to build a couple of libraries and an executable.
I include the STLport location in the Additional Include Path of the libraries and include the library in the input to linker for executable.

The library however seems to reffer to stl symbols (such as string) without the stl port namespace.
This results in a linker error.

these are the relevant lines from the command line on the 2 libraries and executable:

/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 

Here is an example of an error.
Error 7 error LNK2001: unresolved external symbol "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

This symbol Springfield::CClientFramework::ProviderRequest comes from a library ClientArchitecture.lib
This is how dumpbin.exe displays this symbol:
(public: virtual bool __thiscall Springfield::CClientFramework::ProviderRequest(class stlpd_std::basic_string,class stlpd_std::allocator > const &,class stlpd_std::basic_string,class stlpd_std::allocator > const &,class Springfield::IDataStoreNode const *))

Note that the symbol being looked for defines its strings std::basic_string.
Whereas the destination defines symbols as stlpd_std::basic_string.

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文