> > I have never had problems with the DLL and mingw (Though I > do not use it > > all that much now.) > > Have I just been lucky, or is it actually different in this respect? > > I *believe* yes. I think that the MinGW runtime doesn't call WinMain() > at program initialization, but calls main() directly, so > there shouldn't > be a problem. But I could be wrong with this, I can't tell for sure.
I do not know how to tell... Here's some dumps from my shared fltk-1.1 tree (I don't have a shared build of fltk-1.3 at all right now) which I tweaked to "ensure" that is uses the DLL's for fluid builds (as Greg pointed out the stock build, even shared, still links mostly static when making fluid.) So, anyway, it makes two versions of fluid (fluid.exe and fluid-shared.exe) though they are effectively the same, neither is really any more "shared" than the other... Here are the link lines that are used: echo Linking fluid-shared.exe... Linking fluid-shared.exe... g++ -O3 -Wall -Wunused -Wno-format-y2k -fno-exceptions -fno-strict-aliasing -mwindows -L/usr/local/lib -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o fluid-shared.exe CodeEditor.o Fl_Function_Type.o Fl_Group_Type.o Fl_Menu_Type.o Fl_Type.o Fl_Widget_Type.o Fl_Window_Type.o Fluid_Image.o about_panel.o align_widget.o alignment_panel.o code.o factory.o file.o fluid.o function_panel.o template_panel.o undo.o widget_panel.o -L../src -lfltk_images.dll -lfltk_forms.dll -lfltk.dll -L../lib -L/usr/local/lib -lpng -lz -ljpeg -lole32 -luuid -lcomctl32 -lwsock32 echo Linking fluid.exe... Linking fluid.exe... g++ -O3 -Wall -Wunused -Wno-format-y2k -fno-exceptions -fno-strict-aliasing -mwindows -L/usr/local/lib -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o fluid.exe CodeEditor.o Fl_Function_Type.o Fl_Group_Type.o Fl_Menu_Type.o Fl_Type.o Fl_Widget_Type.o Fl_Window_Type.o Fluid_Image.o about_panel.o align_widget.o alignment_panel.o code.o factory.o file.o fluid.o function_panel.o template_panel.o undo.o widget_panel.o ../lib/libfltk_forms.dll.a ../lib/libfltk.dll.a ../lib/libfltk_images.dll.a ../lib/libfltk.dll.a -L../lib -L/usr/local/lib -lpng -lz -ljpeg -lole32 -luuid -lcomctl32 -lwsock32 And here is what nm makes of the result (I don't know how else to get dependencies out of the exe under win32!) $ nm fluid-shared.exe | grep -i "dll" 00000000 A __dll__ 0045c0a0 I __head_libpng_3_dll 0045c000 I __head_mgwfltknox_1_1_dll 0045c014 I __head_mgwfltknox_forms_1_1_dll 0045c028 I __head_mgwfltknox_images_1_1_dll 00460c7c I _libpng_3_dll_iname 00460a18 I _mgwfltknox_1_1_dll_iname 00460a30 I _mgwfltknox_forms_1_1_dll_iname 00460a64 I _mgwfltknox_images_1_1_dll_iname $ nm fluid.exe | grep -i "dll" 00000000 A __dll__ 0045c0a0 I __head_libpng_3_dll 0045c000 I __head_mgwfltknox_1_1_dll 0045c014 I __head_mgwfltknox_forms_1_1_dll 0045c028 I __head_mgwfltknox_images_1_1_dll 00460c7c I _libpng_3_dll_iname 00460a18 I _mgwfltknox_1_1_dll_iname 00460a30 I _mgwfltknox_forms_1_1_dll_iname 00460a64 I _mgwfltknox_images_1_1_dll_iname So it does appear that the dll dependencies are in place. If I run fluid at the Msys shell it runs (the mgwfltknox-1.1***.dll files are in the path) but if double-clicked from Explorer it chokes complaining that it can't find the DLL (which is correct, they are not installed.) I also see: $ nm fluid.exe | grep -i "winmain" 00401240 T _WinMainCRTStartup This is in both exe's, and to me implies that WinMain is still in play, but is linked into the exe static (it has type "T" in nm). Unless _WinMainCRTStartup is not really related to WinMain, I guess? SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
