If you don't want to red this whole thing, just skip to the bottom 
I am in the process of porting the game Heroes ([url]heroes.sourceforge.net[/url]). I am using celib (http://www.rainer-keuchel.de/software.html) to fill in the gaps left in the wince api. I have managed to get the source to compile, except for the graphics code.
The game seperates the system code from the game code. Unfortunately, since the game was written in pure ANSI c (as opposed to c++) I am having a bit of trouble stripping the c++ stuff from easyce. The reason I'm posting here is because the problem seems to lie in the GAPI headers; they don't want to compile in a c program. I tried fixing the problems, and it compiles, but then when evc links the program, it gives a bunch of "unresolved external symbol" errors, specifically the following:
Now, I think the error stems from the fact that the functions all have __imp_ prepended to their names. Is there anything I can do to fix this?
To summarize:
I'm porting a game.
It won't compile because:
GAPI doesn't want to work with plain C code
And when the headers are fixed, the compiler tries to call the function with a different name
Anyway, Is there any way I can get the GAPI to work in C? Or is it only usable with C++? If this isn't the case, how can I get it to work?[/code]
I am in the process of porting the game Heroes ([url]heroes.sourceforge.net[/url]). I am using celib (http://www.rainer-keuchel.de/software.html) to fill in the gaps left in the wince api. I have managed to get the source to compile, except for the graphics code.
The game seperates the system code from the game code. Unfortunately, since the game was written in pure ANSI c (as opposed to c++) I am having a bit of trouble stripping the c++ stuff from easyce. The reason I'm posting here is because the problem seems to lie in the GAPI headers; they don't want to compile in a c program. I tried fixing the problems, and it compiles, but then when evc links the program, it gives a bunch of "unresolved external symbol" errors, specifically the following:
- Code:
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXCloseDisplay referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXCloseInput referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXIsDisplayDRAMBuffer referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXGetDisplayProperties referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXGetDefaultKeys referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXOpenInput referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXOpenDisplay referenced in function WinMain
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXEndDraw referenced in function updatedisplay
EasyCE.obj : error LNK2019: unresolved external symbol __imp_GXBeginDraw referenced in function updatedisplay
Now, I think the error stems from the fact that the functions all have __imp_ prepended to their names. Is there anything I can do to fix this?
To summarize:
I'm porting a game.
It won't compile because:
GAPI doesn't want to work with plain C code
And when the headers are fixed, the compiler tries to call the function with a different name
Anyway, Is there any way I can get the GAPI to work in C? Or is it only usable with C++? If this isn't the case, how can I get it to work?[/code]