PocketMatrix forums

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

gx.h compile error

I've tried building the ipaq debug version but get this error

Compiling...
sys_win.c
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(56) : error C2061: syntax error : identifier 'GXGetDisplayProperties'
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(56) : error C2059: syntax error : ';'
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(56) : error C2059: syntax error : ')'
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(57) : error C2061: syntax error : identifier 'GXGetDefaultKeys'
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(57) : error C2059: syntax error : ';'
C:\Windows CE Tools\wce300\MS Pocket PC\include\gx.h(57) : error C2059: syntax error : 'type'
Error executing clarm.exe.

sys_win.obj - 6 error(s), 0 warning(s)

anyone got any idea what the problem is ??
For some bizarre reason Microsoft felt that the gx.h file should only work with C++ compilations. Quake is in C. So my solution was to modify the gx.h file. Add "struct" to lines 56 and 57 so they read as follows:

//The following two lines modified by Dan East to make this header C compatible:
//Added "struct" to the following two prototypes:
GXDLL_API struct GXDisplayProperties GXGetDisplayProperties();
GXDLL_API struct GXKeyList GXGetDefaultKeys(int iOptions);

Dan East
Last modification: Dan East - 02/26/01 at 05:49:14
Thanks Dan

I did think of that but it seemed too obvious and I didn't want to change the gx.h file.  anyway it builds now thanks
Dan - maybe try adding that info to the SourceNotes.txt file.  I could see some people giving up over a simple error like that, and not finding this thread.