vs工程链接出现error LNK2005...already defined
今天使用vs2008编译工程无错误,链接过程,出现很多这样的错误:
error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)
这个错误,提示的意思应该是标准库的类已经被定义过了,但找了半天也没发现哪里重复定义,后来发现,原来我的工程使用的是lib库,而vs2008的工程设置的代码生成方式是dll库:
在property->configure->c/c++->code generation->runtime library
将Multi-threaded Debug DLL (/MDd)
改为Multi-threaded Debug (/MTd)
vs工程链接出现error LNK2005...already defined的更多相关文章
- VC++ : error LNK2005: ... already defined in *.obj
今天写代码遇到了这么一个链接错误:"已经在*.obj中定义". error LNK2005: "void __cdecl ReplaceWstringVar(class ...
- 转:error LNK2005: ...already defined in MSVCRTD.lib
编译错误: Error1error LNK2005: _CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR110D.dll)\libcmtd.l ...
- win32 Dll 中添加afx.h 出现如下错误 error LNK2005: _DllMain@12 already defined
win32 Dll 中添加afx.h 出现如下错误 nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in ...
- Solve Error: nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmt.lib(newaop.obj)
Error: nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)&quo ...
- mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
转自VC错误:http://www.vcerror.com/?p=55 问题描述: mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 al ...
- C++工程编译之“error LNK2001: 无法解析的外部符号”
今天一整天都在折腾“error LNK2001: 无法解析的外部符号”,就在头疼不已的时候,总算是找到问题原因了:各个动态链接库的编译方式必须统一才行,要不然很容易对库函数的引用产生冲突.简单来说就是 ...
- error:LNK2005 已经在*.obj中定义
为什么会出现这个错误??“error LNK2005: 已经在*.obj中定义” 编程中经常能遇到LNK2005错误——重复定义错误,其实LNK2005错误并不是一个很难解决的错误,弄清楚它形成的原 ...
- VC error LNK2005 解决办法
error LNK2005: "int __cdecl VerifyVMR9(void)" (?VerifyVMR9@@YAHXZ) 解决办法 在 属性->配置属性-> ...
- error LNK2005: _DllMain@12 已经在 MSVCRTD.lib(dllmain.obj) 中定义
备注:我上次遇到这个问题是Win32 DLL项目中无意中include了afxwin.h,这个是MFC的头文件,把这个include删掉就解决了 ================ 转自:http:// ...
随机推荐
- Unable to automatically debug "XXXXX“
I solved this issue by going to C:\Program Files\Microsoft VisualStudio10.0\Common7\IDE then running ...
- 清除XCode缓存和生成文件
1.Command-Option-Shift-K to clean out the build folder XCode4.2 finder中找到 /Users/apple/Library/ ...
- android138 360 小火箭
package com.itheima52.rocket; import android.app.Service; import android.content.Context; import and ...
- Outlook2010 移动数据文件到其它地方
您可以将数据文件移到计算机的其他文件夹中.移动文件的一个原因在于可使备份更容易并且可以让默认的outlook邮件文件不在存在C盘,导致装系统不见或者文件过大而撑死了C盘.例如,如果数据 ...
- 1085. Perfect Sequence (25)
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1085 At first ...
- 配置phpmyadmin使登录时可填写IP管理多台MySQL 连接多个数据库 自动登录
一.如何设置phpMyAdmin自动登录? 首先在根目录找到config.sample.inc.php复制一份文件名改为config.inc.php(如果已经存在 config.inc.php 文件, ...
- [转]UINavigationController 返回的方法汇总
[html] view plaincopy [self.navigationController popViewControllerAnimated:YES]; UINavigationControl ...
- Eclipse配置C/C++开发环境
开发环境:Eclipse3.2.CDT3.1.MinGW5.1 1.Eclipse及CDT的安装到Eclipse的官方网站http://www.eclipse.org上下载Eclipse.安装CDT. ...
- javaEE学习笔记-利用DOM4J解析xml至数据库
xml代码文件名:test02.xml <ACCESOS> <item> <SOCIO> <NUMERO>00045050</NUMERO> ...
- Debian 7 安装 Python3.4
Debian 7 自带的python是2.7.3,要用最新的3.4版本怎么办?我们从官网下载压缩包自己编译. 一.安装编译用的包 $ sudo apt-get install build-essent ...