Original Post
Hi, I'm trying to do the openGl tutorials. But I get the following errors ------ Build started: Project: NeHe OpenGl tutorial, Configuration: Debug Win32 ------ Compiling... Lesson1.cpp c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(74) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(79) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(86) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [31]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(92) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(96) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(98) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(134) : error C2440: '=' : cannot convert from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(138) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(156) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [94]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(163) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(196) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(199) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(228) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(235) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [35]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(242) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [27]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(249) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(256) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [41]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(268) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(345) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\user\desktop\lotrfan1405\c++\nehe opengl tutorial\nehe opengl tutorial\lesson1.cpp(402) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data Build log was saved at "file://c:\Documents and Settings\user\Desktop\lotrfan1405\C++\NeHe OpenGl tutorial\NeHe OpenGl tutorial\Debug\BuildLog.htm" NeHe OpenGl tutorial - 19 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== And the code won't compile? [Edited by - lotrfan1405 on April 15, 2006 4:34:41 PM]