On 23.05.2011 08:12, asif saeed wrote:
> I think that main() can be extern-declared and WinMain can be included
> verbatim in a standard header for subsystem:Windows release builds. I think
> this can be done through compile-time pre-processor macro magic. Then users
> will be able to use main(). Don't you think so?
I'm sorry, but I have no idea how this should work. Do you mean to
include the complete WinMain() function in a header file that should be
included by the user's program? In fact the compiler doesn't know of
/subsystem:windows, since this is a linker option, but we could maybe
create something like this *minimal* header to be included in your
main program or somewhere else:
FL/winmain.h:
#ifdef FL_DLL
#include <Windows.h>
// int main (int, char **); // should probably not be here ?
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
return main(__argc,__argv);
}
#endif // FL_DLL
Something like that?
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk