On 21.05.2011 18:20, asif saeed wrote:
> I get the following errors:
>
> 1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol
> _WinMain@16 referenced in function ___tmainCRTStartup
> 1>E:\scratch\tt\Release\tt.exe : fatal error LNK1120: 1 unresolved externals
We've been there already (look back in this thread). FLTK would usually
create a WinMain() function, but this doesn't work with the dll version
(this is not a FLTK fault, it's a MS-Windows specific problem).
You can try to create your own or try to include FLTK's
src/fl_call_main.c file, or you can add something like this code to
your main program (after your main() function):
#include <Windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
return main(__argc,__argv);
}
Note that this code is probably not 100% correct and totally untested.
> If I change Linker/System/Subsystem to Console, it builds fine but displays
> a debug/DOS window.
Yes, this is what MS designed it to be.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk