PocketMatrix forums

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

PocketFrog_0_8_1How can I build and run samples on emulator?

Hello.

Subj. When i build project for emulator with PocketFrog, linker shows me error: LINK : fatal error LNK1104: cannot open file 'PocketFrog_EMU_Debug.lib'. How can i make this *lib file?
briefly, to build the lib you need to change the default project from the sample app such as blit to the required pf lib project.
see project / set active project and choose PocketFrog then set the drop downs for the type of build and device.
In this case linker show me next error: blit.cpp
Linking...
PocketFrog_EMU_Debug.lib(rasterizer.obj) : error LNK2019: unresolved external symbol _sqrtf referenced in function "public: void __thiscall Frog::Rasterizer::BlitRotated(int,int,float,class Frog::Surface const *)" (?BlitRotated@Rasterizer@Frog@@QAEX
HHMPBVSurface@2@@Z)
emulatorDbg/Blit.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

What have I made not correctly?
I have the same problem. Building project for PocketPC emulator in EVC 3.0 I get such error messages:

Code:

Linking...
blit.obj : error LNK2019: unresolved external symbol "unsigned int __stdcall PHAL::GetClock(void)" (?GetClock@PHAL@@YGIXZ) referenced in function "public: virtual bool __thiscall BlitSample::GameInit(void)" (?GameInit@BlitSample@@UAE_NXZ)
PocketFrog_EMU.lib(game.obj) : error LNK2019: unresolved external symbol "bool __stdcall PHAL::GetKeyList(struct PHAL::KeyList *,enum PHAL::Orientation)" (?GetKeyList@PHAL@@YG_NPAUKeyList@1@W4Orientation@1@@Z) referenced in function "private: bool _
_thiscall Frog::Game::Init(void)" (?Init@Game@Frog@@AAE_NXZ)
PocketFrog_EMU.lib(surface.obj) : error LNK2019: unresolved external symbol "public: static class PHAL::Surface * __stdcall PHAL::Surface::Create(unsigned int,unsigned int)" (?Create@Surface@PHAL@@SGPAV12@II@Z) referenced in function "public: __this
call Frog::Surface::Surface(unsigned int,unsigned int)" (??0Surface@Frog@@QAE@II@Z)
PocketFrog_EMU.lib(surface.obj) : error LNK2019: unresolved external symbol "public: static class PHAL::GDISurface * __stdcall PHAL::GDISurface::Create(unsigned int,unsigned int)" (?Create@GDISurface@PHAL@@SGPAV12@II@Z) referenced in function "publi
c: struct HDC__ * __thiscall Frog::Surface::GetDC(bool)" (?GetDC@Surface@Frog@@QAEPAUHDC__@@_N@Z)
PocketFrog_EMU.lib(display.obj) : error LNK2019: unresolved external symbol "public: static class PHAL::Display * __stdcall PHAL::Display::Create(struct HWND__ *,struct PHAL::DisplayParameters &)" (?Create@Display@PHAL@@SGPAV12@PAUHWND__@@AAUDisplay
Parameters@2@@Z) referenced in function "private: __thiscall Frog::Display::Display(struct HWND__ *,struct PHAL::DisplayParameters &)" (??0Display@Frog@@AAE@PAUHWND__@@AAUDisplayParameters@PHAL@@@Z)
PocketHAL_EMU.lib(win32display.obj) : error LNK2019: unresolved external symbol _IsWindow referenced in function "public: virtual __thiscall PHAL::Win32Display::~Win32Display(void)" (??1Win32Display@PHAL@@UAE@XZ)
PocketHAL_EMU.lib(drv_GAPI.obj) : error LNK2019: unresolved external symbol _IsWindow referenced in function "public: __thiscall PHAL::DriverGAPI::DriverGAPI(void)" (??0DriverGAPI@PHAL@@QAE@XZ)
PocketHAL_EMU.lib(drv_direct.obj) : error LNK2001: unresolved external symbol _IsWindow
PocketHAL_EMU.lib(drv_GDI.obj) : error LNK2001: unresolved external symbol _IsWindow
PocketHAL_EMU.lib(wndhook.obj) : error LNK2019: unresolved external symbol _SetWindowLongW referenced in function "bool __cdecl PHAL::InstallHook(struct HWND__ *,struct PHAL::IEventsCallbacks *)" (?InstallHook@PHAL@@YA_NPAUHWND__@@PAUIEventsCallback
s@1@@Z)
PocketHAL_EMU.lib(wndhook.obj) : error LNK2019: unresolved external symbol _CallWindowProcW referenced in function "long __cdecl PHAL::WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@PHAL@@YAJPAUHWND__@@IIJ@Z)
PocketHAL_EMU.lib(wndhook.obj) : error LNK2019: unresolved external symbol _DefWindowProcW referenced in function "long __cdecl PHAL::WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@PHAL@@YAJPAUHWND__@@IIJ@Z)
PocketHAL_EMU.lib(CoreDLL.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddressW referenced in function "private: __thiscall PHAL::CoreDLL::CoreDLL(void)" (??0CoreDLL@PHAL@@AAE@XZ)
PocketHAL_EMU.lib(AygshellDLL.obj) : error LNK2001: unresolved external symbol __imp__GetProcAddressW
PocketHAL_EMU.lib(GXDLL.obj) : error LNK2001: unresolved external symbol __imp__GetProcAddressW
PocketHAL_EMU.lib(GXDMA.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddressW referenced in function "private: __thiscall PHAL::GXDMA::GXDMA(void)" (??0GXDMA@PHAL@@AAE@XZ)
PocketHAL_EMU.lib(DLL.obj) : error LNK2019: unresolved external symbol _LoadLibraryW referenced in function "protected: __thiscall PHAL::DLL::DLL(unsigned short const *)" (??0DLL@PHAL@@IAE@PBG@Z)
PocketHAL_EMU.lib(DLL.obj) : error LNK2019: unresolved external symbol __imp__FreeLibrary referenced in function "public: virtual __thiscall PHAL::DLL::~DLL(void)" (??1DLL@PHAL@@UAE@XZ)
PocketHAL_EMU.lib(drv_direct.obj) : error LNK2019: unresolved external symbol __imp__Sleep referenced in function "public: virtual class PHAL::Surface * __thiscall PHAL::DriverDirect::BeginScene(void)" (?BeginScene@DriverDirect@PHAL@@UAEPAVSurface@2
@XZ)
PocketHAL_EMU.lib(drv_GDI.obj) : error LNK2019: unresolved external symbol _ReleaseDC referenced in function "public: virtual __thiscall PHAL::DriverGDI::~DriverGDI(void)" (??1DriverGDI@PHAL@@UAE@XZ)
PocketHAL_EMU.lib(extescape.obj) : error LNK2001: unresolved external symbol _ReleaseDC
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2001: unresolved external symbol _ReleaseDC
PocketHAL_EMU.lib(drv_GDI.obj) : error LNK2019: unresolved external symbol _GetDeviceCaps referenced in function "public: static bool __cdecl PHAL::DriverGDI::Detect(struct PHAL::DisplayInfo &)" (?Detect@DriverGDI@PHAL@@SA_NAAUDisplayInfo@2@@Z)
PocketHAL_EMU.lib(drv_GDI.obj) : error LNK2019: unresolved external symbol _GetDC referenced in function "public: static bool __cdecl PHAL::DriverGDI::Detect(struct PHAL::DisplayInfo &)" (?Detect@DriverGDI@PHAL@@SA_NAAUDisplayInfo@2@@Z)
PocketHAL_EMU.lib(extescape.obj) : error LNK2001: unresolved external symbol _GetDC
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2001: unresolved external symbol _GetDC
PocketHAL_EMU.lib(drv_GDI.obj) : error LNK2019: unresolved external symbol _BitBlt referenced in function "public: virtual void __thiscall PHAL::DriverGDI::EndScene(unsigned int)" (?EndScene@DriverGDI@PHAL@@UAEXI@Z)
PocketHAL_EMU.lib(extescape.obj) : error LNK2019: unresolved external symbol _ExtEscape referenced in function "bool __cdecl PHAL::GetFrameBufferInfo(struct PHAL::FrameBufferInfo *)" (?GetFrameBufferInfo@PHAL@@YA_NPAUFrameBufferInfo@1@@Z)
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2019: unresolved external symbol _SelectObject referenced in function "private: __thiscall PHAL::GDISurface::GDISurface(unsigned int,unsigned int)" (??0GDISurface@PHAL@@AAE@II@Z)
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2019: unresolved external symbol _CreateCompatibleDC referenced in function "private: __thiscall PHAL::GDISurface::GDISurface(unsigned int,unsigned int)" (??0GDISurface@PHAL@@AAE@II@Z)
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2019: unresolved external symbol _CreateDIBSection referenced in function "private: __thiscall PHAL::GDISurface::GDISurface(unsigned int,unsigned int)" (??0GDISurface@PHAL@@AAE@II@Z)
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2019: unresolved external symbol _DeleteObject referenced in function "public: virtual __thiscall PHAL::GDISurface::~GDISurface(void)" (??1GDISurface@PHAL@@UAE@XZ)
PocketHAL_EMU.lib(GDISurface.obj) : error LNK2019: unresolved external symbol _DeleteDC referenced in function "public: virtual __thiscall PHAL::GDISurface::~GDISurface(void)" (??1GDISurface@PHAL@@UAE@XZ)
PocketHAL_EMU.lib(clock.obj) : error LNK2019: unresolved external symbol __imp__GetTickCount referenced in function "unsigned int __cdecl PHAL::GetClock(void)" (?GetClock@PHAL@@YAIXZ)
X86EMRel/Blit.exe : fatal error LNK1120: 24 unresolved externals
Error executing link.exe.

Blit.exe - 35 error(s), 0 warning(s)
usually when you get linker problems like the above your project settings are not pointing to the correct folders. After the game compiles if goes off to resolve the external libraries and can't. Maybe if you look at the setup info I included in my recent Hekkus article and compare to your own project re: the HAL library it will assist? (Is there a descriptive document showing how to get HAL going??)
See:-
[urlhttp://www.sundialsoft.freeserve.co.uk/pocket_frog_Ch5.htm[/url]
(Also you have to have the library you need actually built.)
DjemOK wrote:In this case linker show me next error: blit.cpp
Linking...
PocketFrog_EMU_Debug.lib(rasterizer.obj) : error LNK2019: unresolved external symbol _sqrtf referenced in function "public: void __thiscall Frog::Rasterizer::BlitRotated(int,int,float,class Frog::Surface const *)" (?BlitRotated@Rasterizer@Frog@@QAEX
HHMPBVSurface@2@@Z)
emulatorDbg/Blit.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

What have I made not correctly?


I resolved the same problem in this way.

In "\PocketFrog\source\rasterizer.cpp" at line 27 you find this code:
#if (_WIN32_WCE < 400)

try substitute it with this:
#if (_WIN32_WCE)

then you compile it without errors.
First of all, Hi y'all. Long time lurker, first time poster.

I tried the above fix and it works perfectly when compiling the library for the emulator, but I got an error when compiling for the ARM processor. I fixed the line as follows (okay, it's a bit of a hack, but it works for me).

Change Line 27 in Rasterizer.cpp to:

#if defined (_WIN32_WCE) && defined (_X86_)

This compiles correctly for me for both the ARM processor and the emulator in EVC 4.0.

-Brad
Hmmm... Of course the following works just as well and is simpler:

#if defined (_X86_)

So that may be the way to go...

-Brad
aib wrote:I have the same problem. Building project for PocketPC emulator in EVC 3.0 I get such error messages:

Code:

Linking...
blit.obj : error LNK2019: unresolved external symbol "unsigned int __stdcall PHAL::GetClock(void)" (?GetClock@PHAL@@YGIXZ) referenced in function "public: virtual bool __thiscall BlitSample::GameInit(void)" (?GameInit@BlitSample@@UAE_NXZ)
etc.....

X86EMRel/Blit.exe : fatal error LNK1120: 24 unresolved externals
Error executing link.exe.

Blit.exe - 35 error(s), 0 warning(s)



I know this is a common problem. I am stuck at this point too although I've figured out the rest up to this point b4 I discovered pocketmatrix. Anyway, according to other peoples advice, our code should be compiling, so what are we doing wrong?
Which directory do you unzip pocketfrog to just in case it makes a difference?
Is there more than 1 version going around, one of which doesn't quite work?
Any ideas?
i think i got the same errors !

So , can somebody tell us how to compile the correct version for emulator ?
Bobesa · 15 May 2007, 16:39 UTC — :)
well my opinion is that its faster to use VC++ to test your app on pc (no need to load it to emulator, no need to wait for emulator etc.) and other thing is that you dont have to use emulator = problem solved :lol:

Im testing my apps with VC++ and crafting them to PDA with eVC3 :)