PocketMatrix forums

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

Problem with UNICODE, VC6 & PocketFrog's loadimage again

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!!!
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
Presto wrote: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


i rebuilt the PocketFrog_x86_Debug.lib in VC6 and PocketFrog_ARM_Debug.lib in eVC.

i built my project with PocketFrog_ARM_Debug.lib in eVC - 0 errors.
And built project with PocketFrog_x86_Debug.lib in VC6 - error LNK2001: unresolved external..
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
thanks Dan East.

i forgot to define UNICODE in VC6 PoketFrog project.

Many thanks to everyone for their assistance :D