Jump to content
  • Advertisement
Sign in to follow this  
justcallmedrago

UNICODE will not undefine!

This topic is 3795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Why won't this work?
#ifdef UNICODE
#undef UNICODE
#endif
#ifdef _UNICODE
#undef _UNICODE
#endif

// Include files
#include <windows.h>
#include <windowsx.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <time.h>
#include <vector.h>
#include <string>
#include <fstream>
#include <iostream>

Whenever I type "UNICODE" then hover my mouse over it, it says "#define UNICODE 1" even if I'm at the very first line of code! When I rightclick->go to definition, it tells me UNICODE isn't defined! I don't want to have to change every MessageBox() to MessageBoxA(), or change every "" to L""! I just want to get rid of UNICODE. Using VC++ 2005

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by justcallmedrago
Why won't this work?
*** Source Snippet Removed ***
Whenever I type "UNICODE" then hover my mouse over it, it says "#define UNICODE 1" even if I'm at the very first line of code! When I rightclick->go to definition, it tells me UNICODE isn't defined!

Intellisense isn't perfect. Use it as a coding aid, not as a code checker.

Share this post


Link to post
Share on other sites
If UNICODE has been defined via the commandline (for instance, if it's defined because you're set to use Unicode in the project properties) you can't #undef it. Change the project properties instead.

Share this post


Link to post
Share on other sites
Go to Project Properties->Configuration Properties->General->Character Set and change it to "Not Set."

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!