C ++ / CLI DLL项目从VS2008转换到VS2010后停止链接 [英] C++/CLI DLL project stops linking after conversion from VS2008 to VS2010

查看:144
本文介绍了C ++ / CLI DLL项目从VS2008转换到VS2010后停止链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我转换了一个完美的工作Managed C ++ DLL项目,它使用Unmanaged C + + LIBs从VS2008到VS2010。之前我用VS2010单独重建了LIB(它们是我没有权限的另一个项目的一部分)。但是,转换后,我的托管DLL项目停止链接,给我几个LNK2001错误消息(见下面的示例)。关于string和iosfwd标题中定义的std实体的所有错误。我缺少哪些编译器/链接器设置?

I converted a perfectly working Managed C++ DLL project that uses Unmanaged C++ LIBs from VS2008 to VS2010. Beforehand I separately rebuilt the LIBs with VS2010 (they are part of another project that I have no authority over). However, after conversion my managed DLL project stopped linking giving me few dosen of LNK2001 error messages (see the sample below). All errors about "std" entities defined within "string" and "iosfwd" headers. Which compiler/linker settings am I missing?

感谢您的帮助。

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator!=<char,struct std::char_traits<char>,class td::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned __int64 const std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::npos" (__imp_?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (__imp_?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const " (__imp_?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (__imp_??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z)

Auxiliary.lib(Error.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::substr(unsigned __int64,unsigned __int64)const " (__imp_?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z)

etc...


推荐答案

最后找到它(感谢Hans Passant的提示!)我有一些文件,仍然是由VS2008构建的,导致的问题。感谢大家谁打扰添加评论。

Finally found it (thanks Hans Passant for the tip!) I had a few files that were still built by VS2008 and that caused the issue. Thanks to everyone who bothered to add a comment.

这篇关于C ++ / CLI DLL项目从VS2008转换到VS2010后停止链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆