C++ express 2005
Has anyone tried any of the tutorials with VS c++ 2005 express? I'm having a little dificulty with it. When I try any of the tutorials from scratch, I get a whole bunch of errors. The one that I seem to get the most of is as follows
c:\documents and settings\1\my documents\visual studio 2005\projects\bla\bla\main.cpp(489) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
When I download the completed tutorial, strip it of code etc and use it as a base for other tutorials, it works great. I'm guessing that there is some setting that needs to be changed. I've fooled around for quite a while but unsuccessfully. I'm pretty new to opengl and c++ and any help would be great. If more info is needed, ask away.
EDIT:
Another error that I'm having trouble with...
c:\documents and settings\1\my documents\visual studio 2005\projects\bla\bla\main.cpp(596) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data
If I disable that error, all other errors go away but another pops up which reads..
cl : Command line error D8021 : invalid numeric argument '/wdc:\documents'
And I have no idea where to go from there.
Well, which tutorial are you using exactly. Are they the ones from MSDN? Usually if you are a beginner, I would recommend to find a tutorial that is "easier" to work off of.
Quote:Original post by mikkowus
c:\documents and settings\1\my documents\visual studio 2005\projects\bla\bla\main.cpp(489) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
The error I see here looks as if it is coming from the Message box function. Is this error coming from native win32 code or a windows form project?
Quote:Original post by mikkowus
c:\documents and settings\1\my documents\visual studio 2005\projects\bla\bla\main.cpp(489) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
It seems that you are compiling with Character Set set to Unicode, so MessageBox expect an array of wchar_t, not char, hence the error.
To compile it as it is, go in the properties dialog of the project, go to "General", and change "Character Set" to "Use Multi-byte Character Set".
Edited my first post... has a little more info.
No, I'm using the tutorials from nehe such as http://nehe.gamedev.net/lesson.asp?index=01
These errors come from any tutorial.
I'm using native win32 code.
No, I'm using the tutorials from nehe such as http://nehe.gamedev.net/lesson.asp?index=01
These errors come from any tutorial.
I'm using native win32 code.
Hmm...Your errors seem kind of vague, can you include the source code of your project. I'm working off popsicle sticks and need a better medium to build the foundation.
EDIT: Nevermind, forget what I just said. Make sure you have the platform sdk & the neccesary opengl files also. You can work this two ways. Do what hakabu says, his explanation is more concise.
EDIT: Nevermind, forget what I just said. Make sure you have the platform sdk & the neccesary opengl files also. You can work this two ways. Do what hakabu says, his explanation is more concise.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement