VS编译链接错误总结ing
2012-10-10 15:48
127 查看
1.怎么解决Excel.ApplicationClass' cannot be embedded问题?
当升级VS2008到VS2010时出现Interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. Use the applicable interface instead问题
解决方案:打开相关调用 的DLL然后,the Properties tab for the assembly in Visual Studio 2010 and set "Embed Interop Types" to "False
Reference:http://www.cnblogs.com/computer-lzy/archive/2011/11/08/2240727.html
2.fatal error RC1015: cannot open include file '***.h'.
这个问题倒是头次遇到,连资源头文件也要包含进来,项目属性->资源->常规->附件包含目录。
3. mfcs90d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
网上找了一下,原来是CRT 库对某些函数使用弱外部链接导致的。
microsoft给出了解决办法:http://support.microsoft.com/kb/148652
由于其给出的解决方案是基于VC6.0的,因此我在VS2008编译器上实践如下:
进入工程的Properties,然后Linker的input下,在“Additional Dependencies”中填入 mfcs90d.lib MSVCRTD.lib,然后在Ignore Specific Library中填入mfcs90d.lib;MSVCRTD.lib,再链接即可通过。
其实也就是手动指定两个库的链接顺序罢了。(先链接MFC库,再链接CRT库)
当升级VS2008到VS2010时出现Interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. Use the applicable interface instead问题
解决方案:打开相关调用 的DLL然后,the Properties tab for the assembly in Visual Studio 2010 and set "Embed Interop Types" to "False
Reference:http://www.cnblogs.com/computer-lzy/archive/2011/11/08/2240727.html
2.fatal error RC1015: cannot open include file '***.h'.
这个问题倒是头次遇到,连资源头文件也要包含进来,项目属性->资源->常规->附件包含目录。
3. mfcs90d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
网上找了一下,原来是CRT 库对某些函数使用弱外部链接导致的。
microsoft给出了解决办法:http://support.microsoft.com/kb/148652
由于其给出的解决方案是基于VC6.0的,因此我在VS2008编译器上实践如下:
进入工程的Properties,然后Linker的input下,在“Additional Dependencies”中填入 mfcs90d.lib MSVCRTD.lib,然后在Ignore Specific Library中填入mfcs90d.lib;MSVCRTD.lib,再链接即可通过。
其实也就是手动指定两个库的链接顺序罢了。(先链接MFC库,再链接CRT库)
相关文章推荐
- VS编程常见的编译和链接错误
- C++编译,链接错误总结
- VC 编译链接错误总结
- 在 VS 中编译项目时出现 error LNK2005 链接错误的解决办法
- VS编译Qt时若主函数为wmain时出现链接错误,找不到main入口函数
- VS编译通过,g++编译报错 - 错误总结
- VS2013 编译错误提示总结
- VS 编译链接错误集锦
- 本人遇到的常见g++编译链接错误总结
- VS中DLL的导出宏的定义和头文件的位置导致的两类编译错误总结
- VS编译链接时错误(Error Link2005)的解决方法
- vs.net 中编译链接vc工程时的LNK171@mspdb140.dll错误处理
- VC++的链接错误LNK2005总结
- vs2013编译caffe的io.cpp文件错误,open close无法识别
- 用.NET CORE做项目,VS里编译碰到‘。。。。包降级。。。。’错误
- Qt Creator 编译 ROS 包出现链接错误解决办法
- Linux ubuntu 14.04 x86_64平台 gcc编译错误 Error: unsupported instruction `mov' 及ld链接错误
- c++编译时遇到的错误总结(不定期更新,遇到问题就写在这里面)
- vs编译std::numeric_limits::max()编译错误
- Win7 & VS2013 编译 WebKit 总结