• 12
• 12
• 9
• 10
• 13

# UNICODE will not undefine!

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

## 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 on other sites
Quote:
 Original post by justcallmedragoWhy 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 on other sites
Sorry I forgot to mention it won't compile either because of non 'L""' character strings later.

##### 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.