error LNK2005: "private: __thiscall type_info::type_info(class&n

来源:互联网 发布:js 正则匹配 编辑:程序博客网 时间:2024/06/06 17:02

http://blog.sina.com.cn/s/blog_a7b5c0320101efeu.html

我不知道别人出现这个问题是什么原因,我说说我的吧,因为我的是64位的win7,但是现在要生成32位的dll。前提是生成64位的dll没有问题

但是当我想生成32位的dll时,就出现了这问题了
 : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) 已经在 LIBCMTD.lib(typinfo.obj) 中定义
到网上找了些资料:如下

要解决,最简单的方法是不要用vs,第二简单的方法是在link commandline加上一行/FORCE:MULTIPLE

简单来说就是VS10的STL从import变成static了

 我照着将link commandline加上一行/FORCE:MULTIPLE

: <wbr>error <wbr>LNK2005: <wbr>"private: <wbr>__thiscall <wbr>type_info::type_info(class&n
就行了,链接就没问题了。

0 0
原创粉丝点击