EclipseCDT Unicode puzzles me.
| ylxin1993 (73) |
|
In vs2010, I create an empty win32 console application--> windows app, the default character setting is unicode, I have to put the before a string, but when I copy my code from vs2010 to eclipse, it doesn't, it says | cannot convert 'const wchar_t*' to 'LPCSTR' | , I know it is because eclipse default is not unicode, needn't put before string, I want to know how to setting unicode in ecplipse .
|
|
|
| modoran (1101) |
|
Add this before including windows.h or any other header file:
1 2
|
#define UNICODE
#define _UNICODE
|
Alternatively, add UNICODE and _UNICODE to preprocesor definitions in Eclipse.
|
|
|