On May 24, 2011, at 11:55 AM, Greg Ercolano wrote: > (Moving the fltk.general thread "Link Errors / Visual C++ 2010 Express" here) > > Asif writes: >>> May be you can name such header dll_linked_app.h or something like that. > > Albrecht writes: >> I think that winmain.h is a good choice, isn't it? > > This would mean the user program would have to have an #ifdef > in their main.cxx to handle a DLL vs non-DLL build, which is a > detail I'd think we should want to avoid if we can. > > My thinking on how this all worked before: > > fltkdll.lib -- has WinMain(), no fltk code (basically a /very/ small > static lib) > fltkdll.dll -- has the fltk code, but no WinMain()
That's not how Windows import libraries work; fltkdll.lib has to be generated from fltkdll.dll, otherwise we'll never load fltkdll.dll. What we'd need is a fltkmain.lib static library that just has the WInMain junk. > ... > Assuming that works, the only thing that might be wrong with this > (having a small static link stub to access the DLL) would be an > LGPL issue, believe it or not. That's why FLTK isn't pure LGPL - we include an exception for static linking... ________________________________________ Michael Sweet, Easy Software Products _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev