Page 1 of 1

Cannot compile this code under VC++ .NET

PostPosted: Aug 30, 2002 @ 6:11am
by efortier

PostPosted: Aug 30, 2002 @ 7:13am
by efortier
Ok, I have found part of the problem, but not the solution.

In VC++ .NET, you can set your project to use UNICODE or MULTIBYTE.

Under multibyte, all my wcscpy() and such would generate errors, because it cannot convert "TCHAR *" to "wchar_t *". (DUH... Aren't they the same?)

So, if you set your program to UNICODE, it works, but the linker chokes with the errors I gave in the previous post.

So, leaving the project under Multibyte seems to be the only solution I found, but then DrawText() and other GapiDraw function calls expect a TCHAR, and wcscpy() expect wchar_t.

I'm stumped. Is there a trick I can use to make some type of conversion?

Thanks.

PostPosted: Aug 30, 2002 @ 8:36am
by Hosed
The trick is really quite simple, always use Unicode. I can't think of any real reason to use Multibyte.

PostPosted: Aug 30, 2002 @ 2:22pm
by Johan

PostPosted: Aug 30, 2002 @ 9:57pm
by Hosed

PostPosted: Aug 31, 2002 @ 6:11pm
by efortier