> There's no way to change this with a configure option or an environment
> variable, but I modified the check to look for "/usr " (note the
> trailing space) in the first place, so that I could simplify the check.
> I hope this works for your and doesn't break other MinGW installs.

Tried out your change:
msyspath=`mount | grep '\/usr ' | cut -d ' ' -f -1 | sed -e 's/\\\/\// g'`
On my system, it returns:
MSys docpath=C:/mingw/msys/local/share/doc/fltk
Since there's only one path returned instead of multiple, this doesn't mess up 
the compile on my system.

Here's a copy of the Unwind error I saw when I used
-static-libgcc and -static-libstdc++ and didn't add -lgcc_eh:

g++ -I/usr/local/include -I/mingw/include -I/include -I/usr/include   ui.o mm.o 
-o fltkmm -L/usr/local/lib -L/mingw/lib -L/lib -L/usr/lib -static-libgcc 
-static-libstdc++   -lfltk
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/libgcc_eh.a(unwind-dw2.o):(.text+0x298c):
multiple definition of `_Unwind_Resume'
/mingw/msys/usr/local/lib/libfltk.dll.a(d000076.o):(.text+0x0): first defined 
here
collect2: ld returned 1 exit status

The test cases in the fltk directory worked fine (no unwind errors), but I 
think that's possibly because they're statically linking against fltk.  I was 
attempting to statically link the C and C++ libraries, but dynamically link the 
fltk library with another fltk application.  Not sure why using -static-libgcc 
-static-libstdc++ -lgcc_eh works, but it appears to be okay.  I also did some 
experimenting with using --enable-runtime-pseudo-reloc in place of 
-enable-runtime-pseudo-reloc-v2, so that may have helped.  Am going to test 
build some fltk applications with those settings for now and see if I run 
across any drawbacks doing it that way.

One other strange thing I noticed, if I built fltk using ./configure, make, 
it's fine.  However, if I built fltk using ./configure --enable-shared 
--enable-threads --enable-gl, make I noticed the following error:
g++ -L. -mwindows -shared -Wl,--whole-archive -Wl,--export-all-symbols 
-Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import 
-Wl,--enable-auto-image-base -o mgwfltknox_images-1.3.dll 
../lib/libfltk_images.a ...
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot 
find -lpng
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot 
find -lz
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot 
find -ljpeg
collect2: ld returned 1 exit status
make[1]: *** [mgwfltknox_images-1.3.dll] Error 1
make: *** [all] Error 1

I used the following patch to avoid the error:
--- src\fltk-1.3.0\makeinclude.in       2010-12-23 09:24:29 -0500
+++ tmp\fltk-1.3.0\makeinclude.in
@@ -99,7 +99,7 @@ LINKFLTKIMG   = @LINKFLTKIMG@ @LINKFLTK@ $
 LINKFLTKCAIRO  = @LINKFLTKCAIRO@ $(CAIROLIBS)
 FLTKCAIROOPTION = @FLTKCAIROOPTION@
 LINKSHARED     = @DSOLINK@ @LINKSHARED@ $(IMAGELIBS) $(CAIROLIBS)
-IMAGELIBS      = -L../lib @IMAGELIBS@
+IMAGELIBS      = -L../lib @LDFLAGS@ @IMAGELIBS@

That lets me pass the locations of the system graphics libraries via LDFLAGS.  
Possibly, I'm configuring with inappropriate options and don't need to add the 
arguments to configure?

Thanks for all the help with this.  It's very much appreciated.

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to