1>------ Build started: Project: VC3.4.3, Configuration: Debug Win32 ------ 1>Build started 2012/1/17 2:15:58. 1>InitializeBuildStatus: 1> Touching "Debug\VC3.4.3.unsuccessfulbuild". 1>ClCompile: 1> VC3.4.3.cpp 1>e:\visual studio 2010\vc3.4.3\vc3.4.3\vc3.4.3.cpp(3): warning C4651: '/D_UNICODE' specified for precompiled header but not for current compile 1>e:\visual studio 2010\vc3.4.3\vc3.4.3\vc3.4.3.cpp(3): warning C4651: '/DUNICODE' specified for precompiled header but not for current compile 1>e:\visual studio 2010\vc3.4.3\vc3.4.3\vc3.4.3.cpp(23): error C2440: '=' : cannot convert from 'char [8]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast//===================错误一 1>e:\visual studio 2010\vc3.4.3\vc3.4.3\vc3.4.3.cpp(29): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [8]' to 'LPCWSTR'//错误二 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:00.65 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
请问各位这个错误怎么解决呢,网上的方法我试过了,把设置改成Use Multi-Byte Character Set(多字符集),用的是VS2010,开始选择的是MFC Application,直接点了finish,之后删除了原文件里面的所有文件,保留了头文件里面的文件,只建立了一个cpp文件如上图。万分感谢!!!!