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

Problem with UNICODE, VC6 & PocketFrog's loadimage again


Problem with UNICODE, VC6 & PocketFrog's loadimage again

Postby lapkos » Jan 17, 2007 @ 1:25pm

i built VC6 project with UNICODE definition and
got a linker error coming from PocketFrog:

error LNK2001: unresolved external symbol "class Frog::Surface * __cdecl Frog::LoadImageW...

i added to image.h and image.cpp a function with
another name:

//image.h
Surface* LapLoadImage( const TCHAR* filename );

//image.cpp
Surface* LapLoadImage( const TCHAR* filename )
{

Internal::MemoryFile file( filename );
if (!file.IsOpen())
return 0;

return DecompressImage( file.begin(), file.end() );
}

and rebuilt PocketFrog_x86_Debug.lib.

i built my project again with Frog::LapLoadImage insted of Frog::LoadImage and
got a linker error:

error LNK2001: unresolved external symbol "class Frog::Surface * __cdecl Frog::LapLoadImage(unsigned short const *)...

Why??!!

Help please!!!
User avatar
lapkos
pm Member
 
Posts: 12
Joined: Jan 17, 2007 @ 12:25pm


Postby Presto » Jan 17, 2007 @ 7:31pm

After adding the function in image.cpp and image.h, did you rebuild the PocketFrog .lib file, and also link the PocketFrog .lib to your own project?

If you go into Settings for your project, on the Link tab, does it have PocketFrog_x86.lib?

-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby lapkos » Jan 17, 2007 @ 8:33pm

User avatar
lapkos
pm Member
 
Posts: 12
Joined: Jan 17, 2007 @ 12:25pm


Postby Dan East » Jan 18, 2007 @ 12:54am

Something that includes image.h (but not image.cpp) may not have UNICODE defined. Thus TCHAR maps to char, and it is trying to link to Surface* LapLoadImage( const char* filename ).

Make sure you rebuild your entire project, and that UNICODE is defined for all source files (if you are doing that in the project settings).

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby lapkos » Jan 18, 2007 @ 6:30am

thanks Dan East.

i forgot to define UNICODE in VC6 PoketFrog project.

Many thanks to everyone for their assistance :D
User avatar
lapkos
pm Member
 
Posts: 12
Joined: Jan 17, 2007 @ 12:25pm


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

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