PocketMatrix forums

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

PocketQuake compile trouble

OrIgInAlCampass · 23 Jan 2004, 03:23 UTC
I've spent the greater part of the day trying to get PocketQuake to compile. I'm relitively new to PPC development, but I have compiled a few applications before. However, that was with eMbedded Visual C++ 3, not 4.

I uninstalled all previous SDKs and started anew, installing EVC++4, the SP2, PocketPC 2003 SDK, and the QFEs (all from http://www.microsoft.com/windowsmobile/ ... fault.mspx ). When I open PocketQuake's source's workspace file, there is no PocketPC build configuration, so I created one. Attempting to compile lead to it complaining of a missing dinput.h file. After searching this board I found someeone else who had the same troubles. Dan responded saying it was in the Pocket PC 2002 SDK. I grabbed it from the 2002 SDK and attempted compilation again. Now, I get the following:


common.obj : error LNK2019: unresolved external symbol FindNextFlashCard referenced in function COM_InitFilesystem
common.obj : error LNK2019: unresolved external symbol FindFirstFlashCard referenced in function COM_InitFilesystem
console.obj : error LNK2019: unresolved external symbol SHSipPreference referenced in function Con_ToggleConsole_f
net_dgrm.obj : error LNK2019: unresolved external symbol inet_addr referenced in function NET_Ban_f
net_wins.obj : error LNK2019: unresolved external symbol inet_addr referenced in function WINS_GetLocalAddress
net_wins.obj : error LNK2019: unresolved external symbol ntohl referenced in function WINS_GetLocalAddress
net_wins.obj : error LNK2019: unresolved external symbol gethostbyname referenced in function WINS_GetLocalAddress
net_wins.obj : error LNK2019: unresolved external symbol gethostname referenced in function WINS_GetLocalAddress
net_wins.obj : error LNK2019: unresolved external symbol htons referenced in function WINS_Init
net_wins.obj : error LNK2019: unresolved external symbol WSACleanup referenced in function WINS_Init
net_wins.obj : error LNK2019: unresolved external symbol WSAStartup referenced in function WINS_Init
net_wins.obj : error LNK2019: unresolved external symbol closesocket referenced in function WINS_OpenSocket
net_wins.obj : error LNK2019: unresolved external symbol bind referenced in function WINS_OpenSocket
net_wins.obj : error LNK2019: unresolved external symbol ioctlsocket referenced in function WINS_OpenSocket
net_wins.obj : error LNK2019: unresolved external symbol socket referenced in function WINS_OpenSocket
net_wins.obj : error LNK2019: unresolved external symbol recvfrom referenced in function WINS_CheckNewConnections
net_wins.obj : error LNK2019: unresolved external symbol setsockopt referenced in function WINS_MakeSocketBroadcastCapable
net_wins.obj : error LNK2019: unresolved external symbol sendto referenced in function WINS_Write
net_wins.obj : error LNK2019: unresolved external symbol ntohs referenced in function WINS_AddrToString
net_wins.obj : error LNK2019: unresolved external symbol htonl referenced in function WINS_StringToAddr
net_wins.obj : error LNK2019: unresolved external symbol getsockname referenced in function WINS_GetSocketAddr
net_wins.obj : error LNK2019: unresolved external symbol gethostbyaddr referenced in function WINS_GetNameFromAddr
vid_ppc.obj : error LNK2019: unresolved external symbol SHFullScreen referenced in function Win_MouseButton
ARMV4Rel/PocketQuake.exe : fatal error LNK1120: 22 unresolved externals
Error executing link.exe.

PocketQuake.exe - 24 error(s), 0 warning(s)



And at this point I'm stuck.

I'm not particularly good at coding, but after looking through the source I think I may be able to impliment some simple togglable performance tweaks, for instance, don't draw "detail" entities (like torches), or only draw them if you are close to them. Nothing revolutionary, I'm just hoping to squeesze another half an FPS or so out of it on my ipaq.

Any help would be greatly appriciated.

-Jim Kneuper
"OrIgInAlCampass"
You need to link to some external libraries.

aygshell.lib - used for SHFullScreen, showing SIP
winsock.lib - UDP/IP
note_prj.lib - iterate storage cards

Dan East
OrIgInAlCampass · 23 Jan 2004, 20:01 UTC
That did it, but now, the compiled program doesn't run. When run on the PocketPC, it says it can't find PocketQuake.exe or one of its components. The precompiled binary on your site works fine. When run on the emulator, it displays "starting Quake" for a moment, then dies.

I understand you don't have time to sit here and troubleshoot every problem I come across. I'm probably going to give myself a break for a while to clear my head and look into it again in a day or two.

Thanks for your help, and for PocketQuake itself,

-OCA
Its good to see someone with the intention of working on the source. :D
OrIgInAlCampass · 23 Jan 2004, 20:48 UTC — Don't get your hopes up
Don't get your hopes up - everything I'm considering doing is elementary options to allow someone to sacrifice graphic detail for framerate. I don't know nearly enough to make any real optimisations or add any useful feaures.

If I ever get anything to work, I will of course link to it from here (both binary and source, though I can't imagine why anyone would want my code).

-OCA
Open up the original Pocket Quake and your Pocket Quake in Dependancy Viewer and compare what libraries they link to. Also, I assume you are building for ARM, right?

Dan East
OrIgInAlCampass · 25 Jan 2004, 03:30 UTC
I'm back.

I look through the two with Dependancy Walker. However, I've never used this before. It complains that it can't find the dll files that it links to, but shows that each program relies on winsock.dll, coredll.dll, avgshell.dll, and note_prj.dll.

Note that I'm using the PocketPC 2003 SDK, as eVC++ 4 says it won't work with the 2002 one.

Another thing - the file size difference between the two exes is somewhat large. The original is 519k, the one I've built is 593.

I want to say I've had to copy libraries from the old 2002 SDK into the includes in the 2003 sdk. That could be a problem. If so, would there be a way to build it on the 2002 sdk (as I don't believe the 2003 sdk had everything neccisary to build)?

I appriciate your help, just please note that this may not be worth your time, so feel free to tell me to get lost =)

Thanks again,
Jim
OCA|
OrIgInAlCampass · 30 Jan 2004, 14:55 UTC — I got it working!
EVC++4 and the 2003 SDK seem to have serious trouble compiling a working PocketQuake. I switched to EVC++3 and the 2002 SDK and it compiled with only one minor modification, which I do want to verify because it seems really odd that this would work....

I get two instances of the following compile errors (one each for two files):

C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(51) : error C2061: syntax error : identifier 'GXGetDisplayProperties'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(51) : error C2059: syntax error : ';'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(51) : error C2059: syntax error : ')'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(52) : error C2061: syntax error : identifier 'GXGetDefaultKeys'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(52) : error C2059: syntax error : ';'
C:\Windows CE Tools\wce300\Pocket PC 2002\include\gx.h(52) : error C2059: syntax error : 'type'



To get around this, I just commented out lines 51 and 52 of gx.h. Is this normal and/or acceptable?


I'm going to get started, I have a few ideas for graphic detail tradeoffs that will hopefully make multiplayer run smoother.

Thanks yet again for everything =)

-OCA|
Take a look at the notes I included in the source code. You'll find that the default gx.h will not build with C, only C++. I included a modified gx.h with a couple struct's added to make it C compliant.

Dan East
OrIgInAlCampass · 30 Jan 2004, 20:49 UTC
Oh yeah.. I remember doing that in the PPC2003 SDK, but forgot to on the 2002 one.

Thanks =)

-OCA|