C++编译中出现error C2664 ,error C2440,error 2039的解决方法
2016-11-03 16:50
711 查看
用VS2013编写C++程序,遇到
,error C2664: “DWORD GetCurrentDirectoryW(DWORD,LPWSTR)”: 无法将参数 2 从“char [260]”转换为“LPWSTR”,
, error C2440: “=”: 无法从“char [260]”转换为“LPWSTR”
,error C2039: “SetWindowTextA”: 不是“CWnd”的成员,
,error C2665: “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型等编译错误,如下:
排除了编写语句有问题的情况;剩下就是编译器的环境配置问题。最后在更改了项目属性中的字符集就可以了,记录在此免得日后遗忘:设置如下,选择多字符集,重新编译即可!
,error C2664: “DWORD GetCurrentDirectoryW(DWORD,LPWSTR)”: 无法将参数 2 从“char [260]”转换为“LPWSTR”,
, error C2440: “=”: 无法从“char [260]”转换为“LPWSTR”
,error C2039: “SetWindowTextA”: 不是“CWnd”的成员,
,error C2665: “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型等编译错误,如下:
排除了编写语句有问题的情况;剩下就是编译器的环境配置问题。最后在更改了项目属性中的字符集就可以了,记录在此免得日后遗忘:设置如下,选择多字符集,重新编译即可!
相关文章推荐
- 编译apk时出现“Error conversion to Dalvik format failed with error 1”的解决方法
- 关于编译Android时出现Error 41的解决方法
- .NET下编译C++代码时出现fatal error C1083: 无法打开包含文件:“iostream.h”: No such file or directory错误的解决方法.
- 编译源码时出现 Checking API: checkapi-last (unknown): error 17解决方法
- 项目文件.NET下编译C++代码时出现fatal error C1083: 无法打开包括文件:“xuhk_JNIHelloWorld.h”: No such file or directory错误的解决方法。
- .NET下编译C++代码时出现"error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int"错误的解决方法。
- MPI编译C++程序出现#error "SEEK_SET is #defined but must not be for the C++ binding of MPI" 的解决方法
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16
- php5.3.*编译出现make: *** [ext/gd/libgd/gd_compat.lo] Error 1 解决方法
- 关于JCreator在编译程序时出现的"Error:Invalid path"问题的解决方法
- 解决出现 ./configure and got “configure: error: C++ compiler cannot create executables的方法
- 编译源码时出现 Checking API: checkapi-last (unknown): error 17解决方法
- xcode编译时候出现clang: error: linker command failed with exit code 1 (use -v to see invocation)的解决方法
- 编译时出现error:c2220的解决方法
- .NET下编译C++代码时出现fatal error C1083: 无法打开包括文件:“xuhk_JNIHelloWorld.h”: No such file or directory错误的解决方法。
- 编译时出现error:c2220的解决方法
- 编译源码时出现 Checking API: checkapi-last (unknown): error 17解决方法
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 r
- dev-c++中编译含WINSOCK的代码出现错误的解决方法
- android ndk编译出现error :android-ndk-r8c/build/gmsl/__gmsl: 解决方法