The fact it's saying WinMain is unresolved sounds like WinMain is not being defined.
Note that FLTK has its own WinMain() function that gets defined in: src/fl_call_main.c There's an #ifdef clause that encloses it, which might be causing the problem, not sure: #if defined(WIN32) && !defined(FL_DLL) && !defined (__GNUC__) If that #if becomes false, it seems FLTK won't define WinMain. Since you're using DLL's, I'm wondering if that !defined(FL_DLL) is causing WinMain() not to be defined. There's probably a reason for the above logic; the comments in that file say: * Because of problems with the Microsoft Visual C++ header files * and/or compiler, you cannot have a WinMain function in a DLL. * I don't know why. Thus, this nifty feature is only available * if you link to the static library. Perhaps experiment with putting the WinMain() code from that file into your app to see if that helps. I always compile static myself, so I've not run into this. Some other folks more familiar with Win32 can probably weigh in. asif saeed wrote: > Hi Greg, > > I get unresolved linker error on main when I use /SUBSYSTEM:WINDOWS: > > 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol > _WinMain@16 referenced in function ___tmainCRTStartup > 1>E:\scratch\ttt\Debug\ttt.exe : fatal error LNK1120: 1 unresolved externals > > Now in this case I replaced my own code with code from an example > editor.cxx. Same error results. It works fine if I switch to > SUBSYSTEM:CONSOLE. Strangely, I don't know why but when I run editord.exe > from windows shell, it runs without any dos window. All the other examples > in the test directory run with dos window. > > I await for your feedback. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

