静态库LINK2005问题
2009-10-29 16:17
183 查看
今天写了一个console主程序,一个静态库,链接时报LNK2005 错误:
error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" .......
解决方法:
因为是静态库,所以要将静态库工程的runtime设定为Multi-threaded Debug (/MTd);console主程序要设定为同样的runtime。
当然,release版的就使用Multi-threaded (/MT)。
PS: 具体位置在工程属性的C/C++ ->Code Generation->Runtime Library 。
error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" .......
解决方法:
因为是静态库,所以要将静态库工程的runtime设定为Multi-threaded Debug (/MTd);console主程序要设定为同样的runtime。
当然,release版的就使用Multi-threaded (/MT)。
PS: 具体位置在工程属性的C/C++ ->Code Generation->Runtime Library 。
相关文章推荐
- 重复定义问题的原因及解决 link2005 error
- Link2005----设置为动态链接和静态链接的问题
- VS2013的LINK2005问题解决方案(仅限由第三方库造成的问题)+ 附LNK2038
- 解决Xcode升级7.0后,部分.a静态库在iOS9.0的模拟器上,link失败的问题
- jsoncpp在vs2013下的安装以及静态连接错误error LNK2005问题
- 静态链接和动态链接库混用导致的链接错误LINK2005
- Link2005问题
- 静态链接和动态链接库混用导致的链接错误LINK2005
- 重装sql server 2005 遇到的问题Performance Monitor Counter Requirement
- TextView设置autoLink和linksClickable="true"属性值后长按的问题
- SQL 2005头疼的问题
- link 2005/2001 错误
- MFC 静态与非静态的注意问题
- MFC 在类中声明其他类的静态对象出现的问题ATPC.obj : error LNK2001 和&nbs
- 类的静态数据成员初始化问题
- LINK 2005 ERROR
- Sql Server 2005数据库备份问题
- 【配置DATAGUARD 时的监听静态注册不成功】 问题解决
- vs2005水晶报表问题
- nginx负载均衡解决图片css等静态资源无法加载问题