This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Cannot compile this code under VC++ .NET


Cannot compile this code under VC++ .NET

Postby efortier » Aug 30, 2002 @ 6:11am

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby efortier » Aug 30, 2002 @ 7:13am

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.
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby Hosed » Aug 30, 2002 @ 8:36am

The trick is really quite simple, always use Unicode. I can't think of any real reason to use Multibyte.
L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>
User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Postby Johan » Aug 30, 2002 @ 2:22pm

User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Hosed » Aug 30, 2002 @ 9:57pm

L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>
User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Postby efortier » Aug 31, 2002 @ 6:11pm

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron