PocketMatrix forums

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

PHAL::Surface missing 2nd Create()?

PsychoChris · 14 Apr 2008, 20:16 UTC
Hello Thierry,

onn trying to create a surface which uses an existing buffer i get the following linker error:
Code:

unresolved external Symbol "public: static class PHAL::Surface * __cdecl PHAL::Surface::Create(unsigned short *,unsigned int,unsigned int,unsigned int)" (?Create@Surface@PHAL@@SAPAV12@PAGIII@Z)


I do not get this error on using the following method:
Code:
static Surface* Create( unsigned width, unsigned height );


I conclude from this that the method for using an existing buffer is not exported or the signature in the header file doesn't match it. I would like to use that method so that i do not have to copy an already existing buffer to the surface.

Regards,
Chris
I've seen this problem in the past and the cullprint was that EVC 4 (which I use to build the libs) didn't mangle "wchar_t" the same way Visual Studio 2005 did.

Can you tell me which compiler you are using?
PsychoChris · 14 Apr 2008, 22:20 UTC
I'm using Visual C++ 6.0. I also want to use eVC++ 4.0 but i didn't test it unitl now.
I noticed that even when i pass only zeros as parameters the method is not found by the linker so i'm not even sure it is exported at all.

Regards,
Chris
I am also using VC6 to build the win32 library. I have tried to reproduce the problem using PocketHAL 1.0.4 and failed. It works properly for me. This issue for Windows CE was fixed in 1.0.2, so it should be the same for VC6.

I also opened the 1.0.4 library in a binary viewer and the symbol is there:

Code:
?Create@Surface@PHAL@@SAPAV12@PAGIII@Z


Are you using and older version of PocketHAL?
I just verified 1.0.1 and the symbol was exported as:

Code:
?Create@Surface@PHAL@@SAPAV12@PA_GIII@Z


Notice the extra underscore. So if you are using a version older then 1.0.2, you should upgrade.
PsychoChris · 15 Apr 2008, 08:25 UTC
Hello Thierry,

now its clear. The problem was caused by using an old version of PocketHAL. Thanks for your help!

Regards,
Chris