将VS2003迁移到VS2005时Comdef.h链接问题(comsuppwd和comsuppd之间) [英] Comdef.h linking problem (between comsuppwd & comsuppd) when migrating VS2003 to VS2005

查看:102
本文介绍了将VS2003迁移到VS2005时Comdef.h链接问题(comsuppwd和comsuppd之间)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个链接错误:
"comsuppwd.lib(comutil.obj):错误LNK2005:" class _variant_t vtMissing" (?vtMissing @@ 3V_variant_t @@ A)已经在comsuppd.lib(comutil.obj)中定义了
1>创建库D:\ BackTestTesting V2 \BackTestingAppli Portefolio \ BackTestingAppli Portefolio\bin\Debug / BackTesting.lib和对象D:\ BackTestTesting V2 \ BackTestingAppli Portefolio \ BackTestingAppli Portefolio \bin \Debug / BackTesting .exp
1> D:\ BackTestTesting V2 \ BackTestingAppli Portefolio \ BackTestingAppli Portefolio \bin\Debug \BackTesting.dll:致命错误LNK1169:找到一个或多个多重定义的符号"

我更改了comdef.h文件:


Hi,

I've got a linking error :
"comsuppwd.lib(comutil.obj) : error LNK2005: "class _variant_t vtMissing" (?vtMissing@@3V_variant_t@@A) already defined in comsuppd.lib(comutil.obj)
1>   Creating library D:\BackTesting V2\BackTestingAppli Portefolio\BackTestingAppli Portefolio\bin\Debug/BackTesting.lib and object D:\BackTesting V2\BackTestingAppli Portefolio\BackTestingAppli Portefolio\bin\Debug/BackTesting.exp
1>D:\BackTesting V2\BackTestingAppli Portefolio\BackTestingAppli Portefolio\bin\Debug\BackTesting.dll : fatal error LNK1169: one or more multiply defined symbols found"

I changed the comdef.h file from :


#pragma comment lib ," comsupp.lib" )

推荐答案

我在VS 2008中看到这种情况发生时有"和"的图书馆;将wchar_t视为内置类型"  设置为NO,导入库的项目设置为"YES"

I've seen this happen in VS 2008 when linking with a library that has "Treat wchar_t as Built-in Type"  set to NO and the project importing the library is set to "YES"


这篇关于将VS2003迁移到VS2005时Comdef.h链接问题(comsuppwd和comsuppd之间)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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