error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
来源:互联网 发布:多益网络手机游戏 编辑:程序博客网 时间:2024/05/17 23:13
最近在用vs2010编译一些vc6.0做的项目,遇到一些问题。
我在VS2005下写C++的程序,采用一个工程生成DLL文件给另一个工程执行,但每次执行时都出现 error LNK2019: 无法解析的外部符号 "__declspec(dllimport)错误。检查了好几遍代码都觉得没有问题。
最后发现是字符集出现问题。生成DLL文件的字符集是Unicode而生成exe文件的字符集为默认的ASCII。
只要统一字符集即可解决问题:
VS2005的c++项目默认字符集是使用 Unicode 字符集,在项目属性->配置属性-->常规->项目默认值->字符集中设置字符集即可。
补充VC6.0是默认采用ASCII字符集的。
http://www.cnblogs.com/lihaozy/archive/2012/07/05/2577512.html
0 0
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- 【转】error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- 字符集导致的 error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) const HXmlParse::
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static void __cdecl xercesc_2_8::XMLPlatfor
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) long __stdcall RtlGetVersion(struct _OSVERSIONINFOW
- MFC DLL报错:error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall
- osg 多个error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
- VS2010封装DLL时报错:error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl QWidget::
- error LNK2001: 无法解析的外部符号 "__declspec(dllimport)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) int add(int,int)" (__imp_?add@@YGHHH@Z)
- 新建Duilib工程,加入示例代码时,出现error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- mainwindow.obj:-1: 错误:LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
- error LNK2001: 无法解析的外部符号 "__declspec(dllimport) protected: __thiscall std::_Container_base_aux_allo
- 几种常见的基于Lucene的开源搜索解决方案对比
- 排序算法理论及动态实践图
- JavaFX之ListView的使用
- 基本UDP套接字编程
- Ubuntu10下MySQL搭建Amoeba_读写分离
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport)
- 1020. 月饼 (25)
- IBM WebSphere MQ 简介和概述
- Android开发Git版本控制,到底哪些文件不要提交
- Hadoop MapReduce处理海量小文件:基于CombineFileInputFormat(每次往map中读入1行)
- PHP中PDO的基础使用实例
- 浅谈JavaFX事件机制
- Ubuntu10下MySQL搭建Master Slave
- 【sublime】在sublime中创建tab快速代码块