[Dev-C++] link error WinMain@16 not found
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ro...@rp...> - 2006-05-27 19:33:26
|
now this is not your daily 'i forgot WinMain in my windows application'
question but a more complex one.
what i have is a game engine based on heavy modularization. especially
the start-up code is outside the .exe running the engine. hence i have
the game engine in the shape of a .dll file providing entry points for
whatever system you want to run it on so that the user doesn't have to
worry. for windows systems the entry point looks like this:
>>> CODE
int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow ){
=2E..
}
<<< CODE
in the launcher file i simply subclass an application class which keeps
a 'theOneAndOnly' type variable of the app-object. hence the launcher
simply links against my library and provides this subclasses object and
all is working. on my linux box this works like a charm. on the windows
machine with Dev-C++ compiling i reveive a linker error about WinMain@16
missing. it is though part of the linked library and correctly exported
( shows up in the .def file ). what can be wrong? why does the linker
not eat this?
i set the project to be 'Windows Application' without compile/link
options except -ldragengine ( =3D> libdragengine.a in dev-c++/lib ) so i
don't see a problem there. if i compile the library directly as .exe
instead of .dll it does link hence the function is there and recognized.
it simply doesn't work if i link it into an external project not having
WinMain.
--=20
Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.dnsalias.net/ )
- Game Engine: Drag(en)gine (
http://epsylon.rptd.dnsalias.net/dragengine.php )
- Normal Map Generator: DENormGen (
http://epsylon.rptd.dnsalias.net/denormgen.php )
|