Albrecht Schlosser wrote:
> You don't need a #ifdef if you use my example header file, you must only
> #include this _and_ define FL_DLL before the inclusion (usually via the
> command line) if you want to build a DLL version of your program.
I see, so in other words, only the main.cxx of the app
would #include this file.
This would mean all cross platform apps would have to
#include <FL/winmain.h> in only main.cxx.
(And you wouldn't want to include it in other files,
to avoid defining WinMain() more than once)
I guess it's a good solution since it avoids static
linking, and allows its inclusion to be optional, should
someone for instance want to define WinMain() on their own.
Thing is, we should maybe determine how it /used/ to work,
and make sure that technique still does in 1.3.0.
I must admit I had trouble over the weekend getting
a DLL build to work with /subsystem:windows from the
command line, but I didn't try Nikita's suggestion:
> Properties->Linker->Advanced->Import Library
>
> I just tried to build one of tests with dll and all worked fine. ( RC5 )
> But you need change the program settings: fltk.lib -> fltkdll.lib and
> add one more libraries path ..\..\test.
I think effectively I was doing this (statically linking
fltkdll.lib), and I'd cut+pasted the build flags from the
fltk build log for hello.cxx, then modified them for a DLL
oriented build.
I'll try pasting my CL/LINK flags for VS2010 along with the
FLTK build flags to see if a combo can be found for 1.3.x
and then hopefully we can document that, and the VS IDE equivalent
settings for the properties.. and perhaps even include a working
hello DLL test program in 1.3.1.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev