PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Grrrrr Visual Studio 2005

I'm having issues linking to a static lib.. My Issue is NEARLY the same as this post:

http://www.pocketmatrix.com/forums/view ... hp?t=21828

I'm unable to do the fix posted because the fix requires VS2005 BETA2; following the link cleary in big letters says not to download unless using VS2005 beta2. Which I'm not.

What the issue is, no matter what I do the compiler is always trying to convert my strings to char's. For example:

CreateSurface( 0, _T( "1.png" ) );
CreateSurface( 0, L"1.png" );

both give errors saying it is unable to link to the following function because the string I'm passing in is a char. Here's the actual error:

Error ... CGapiSurface::CreateSurface(unsigned long,char const *)

My Properties are set to use Multi-Byte Character Sets. Even switching it to UseUnicode Character sets give the same error. Anybody have any ideas?

~Thanks
InexorableTash · 17 Dec 2007, 00:33 UTC
GapiDraw only supports UNICODE, so you'll want to switch over.

In your project settings, navigate to Configuration Properties : C/C++ : Command Line and make sure that both UNICODE and _UNICODE are defined. This should ensure that the header for CreateSurfaces uses WCHAR and matches the library.
If this doesn't compile then you aren't actually building with UNICODE:
Code:

WCHAR *pTest=new TCHAR[10];


Dan East
barcajunior · 16 Jan 2008, 14:22 UTC
GapiDraw only supports UNICODE

That means I have to convert the character encoding.