PocketMatrix forums

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

Visual studio 2005 compile error

I'm working with visual studio 2005 beta 2 on a Pocket PC device and I'm using the static PocketPC-arm GapiDraw library. Can anyone help me with this linker error:

error LNK2019: unresolved external symbol "public: long __cdecl CGapiSurface::CreateSurface(unsigned long,wchar_t const *)" (?CreateSurface@CGapiSurface@@QAAJKPB_W@Z) referenced in function "public: virtual long __cdecl CMyApplication::ProcessNextFrame(class CGapiSurface *,unsigned long)" (?ProcessNextFrame@CMyApplication@@UAAJPAVCGapiSurface@@K@Z)

This version works fine:
CreateSurface(0,width,height);

but, this gets the above error: CreateSurface(GDSURFACE_SYSTEMMEMORY,_T("mypic.png"));
Bigfoot · 27 Oct 2005, 14:19 UTC — Visual studio 2005 compile error
To import projects from embedded visual c++ 4.0 into visual c++ 2005 beta 2 first you have to install the additional import wizzard eVCUpgradeWizard.msi (you get it from: http://www.microsoft.com/downloads/deta ... laylang=en )
The package installs only a .zip file a readme and a license file.
Unzip the zip file, and run the included install_eVCUW.bat
Maybe you have to replace something in the batch file to make it work:
In my case I had to replace %PROGRAMFILES% to D:\Program Files (X86)\

After instalation MSVC++ 2005 is able to import the projects in GapiDraw351\samples\win32\*\evc4\*.vcp files.

The only thing which has to be changed additionally (to prevent linker errors due to different symbol mangling scemes in eVC4 and MSVC++ 2005) is at: Project/Properties/Configuration Properties/C++/ Language/Treat wchar_t as Built-in type
This setting has to be changed to "No".
After these steps gapidraw samples should build on MS Visual C++ 2005 beta 2.
Thanks for the tips BigFoot. I made this thread sticky.
As I'm working with VS2005 Beta I hope it's ok to post here even though I'm a PF user.
re: the linker errors I get a couple from the Hekkus sound system but when I make the change suggested above I start to get other linker errors (from the main PocketFrog lib) Almost as if PF wants one setting and Hekkus wants another? (I might be completely wrong of course)
My errors are:-
Code:
input.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl hssMusic::load(wchar_t const *)" (__imp_?load@hssMusic@@QAAHPB_W@Z) referenced in function "public: virtual void __cdecl MyGame::StylusDown(class Frog::Point)" (?StylusDown@MyGame@@UAAXVPoint@Frog@@@Z)
treker.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl hssMusic::load(wchar_t const *)" (__imp_?load@hssMusic@@QAAHPB_W@Z)

ps: Bigfoot, you are not the Bigfoot I know are you aka Wolfgang ?[/quote]
I'm using VS 2005 and if I change the above project configuration as mentioned, I get a whole load of NEW linker errors.

Before changing this configuration option and I try to compile, I get the following linker errors:

Code:
1>atlsd.lib(atltypes.obj) : error LNK2005: "public: __cdecl CRect::CRect(struct tagRECT const &)" (??0CRect@@QAA@ABUtagRECT@@@Z) already defined in gapidraw.lib(GapiSurface.obj)
1>ImageRepository.obj : error LNK2019: unresolved external symbol "public: long __cdecl CGapiSurface::CreateSurface(unsigned long,class CGapiVFS *,wchar_t const *)" (?CreateSurface@CGapiSurface@@QAAJKPAVCGapiVFS@@PB_W@Z) referenced in function "public: class CGapiSurface * __cdecl CImageRepository::GetImage(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsOS<wchar_t> > > &,enum CImageRepository::ImageIndexes)" (?GetImage@CImageRepository@@QAAPAVCGapiSurface@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsOS@_W@ATL@@@@@ATL@@W4ImageIndexes@1@@Z)
1>ImageRepository.obj : error LNK2019: unresolved external symbol "public: long __cdecl CGapiVFS::CreateVFS(wchar_t const *)" (?CreateVFS@CGapiVFS@@QAAJPB_W@Z) referenced in function "public: class CGapiSurface * __cdecl CImageRepository::GetImage(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsOS<wchar_t> > > &,enum CImageRepository::ImageIndexes)" (?GetImage@CImageRepository@@QAAPAVCGapiSurface@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsOS@_W@ATL@@@@@ATL@@W4ImageIndexes@1@@Z)


Regarding the CRect error, I've tried commenting out the CRect stuff in GapiDrawExtension.h, but it doesn't fix anything.

Any ideas?