MacArthur, Ian (SELEX GALILEO, UK) wrote: > Here's what I get (Msys/mingw, but ought to be broadly the same as > cygwin...) > > For a build set to use the fltk built-in image libs, I get: > > /d/IanMacarthur/svn/fltk-1.1-local > $ fltk-config --use-images --ldstaticflags > -mwindows -mno-cygwin ./lib/libfltk_images.a ./lib/libfltk_png.a > ./lib/libfltk_z.a ./lib/libfltk_jpeg.a ./lib/libfltk.a -lole32 -luuid > -lcomctl32 -lwsock32 > > > Which I think looks correct.
Thanks, that's what I wanted to have confirmed before investigating further. > However, changing to my build-tree that uses the system image libs I > get: > > /d/IanMacarthur/svn/fltk-1.1-local > $ cd ../fltk-1.1 > > /d/IanMacarthur/svn/fltk-1.1 > $ fltk-config --use-images --ldstaticflags > -mwindows -L/usr/local/lib -mno-cygwin ./lib/libfltk_images.a -lpng -lz > -ljpeg ./lib/libfltk.a -lole32 -luuid -lcomctl32 -lwsock32 > > Which I think is wrong; I have requested static linking, but the shared > png (et al) are selected instead at build time. That confirms my _suspicion_ that it might have something to do with auto-detection of the libs (or did you use --disable-local* ? > We either need to give a "full" name for the archive in the > /some/path/to/libpng.a (etc.) format, That's what I would prefer and probably the only option for 1.1 because... > or consider adding the "-static" > flag or one of its synonyms (-Bstatic etc.) to the command line to try > and force the linker to ignore the shared DLL's. > > This last idea seems simplest for our needs, but I worry about how > portable it might be (although it does seem to work OK for my setup > here, FWIW.) ... portability seems to be the problem here. We can't do such a change now in the RC phase of 1.1.10. > However, what I am not clear on is whether, having set "-static" before > -lpng etc., we then need to reset to "-shared" before we link the win32 > standard libs. > It seems that we don not, in my test, but perhaps I was just "lucky"...? If we would want to be _correct_ then we would even have to _restore_ the setting that the user set up before (on the linker command line), thus this can't work at all. The only solution would be to tell the user to specify such an option in his Makefile before invoking "fltk-config ... --ldflags" and to reset it as s/he needs it thereafter. Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
