MacArthur, Ian (SELEX GALILEO, UK) wrote:
> All,
>
> I've mainly been using fltk-1.3 recently, but today I had to run a build
> with fltk-1.1 svn, and the build failed.
> The same code/Makefile build OK with fltk-1.3.
>
> A brief investigation suggests that the --compile option is returning
> the wrong options for linking the image libs. I think this is because
> --ldstaticflags is returning the wrong options.
>
> Here's some examples. Firstly, the fltk-1.1 output;
>
> $ fltk-config --use-images --ldflags
> -L/usr/local/lib -mwindows -mno-cygwin -lfltk_images -lpng -lz -ljpeg
> -lfltk -lole32 -luuid -lcomctl32 -lwsock32
>
> (comment: --ldflags looks good)
>
>
> $ fltk-config --use-images --ldstaticflags
> -mwindows -L/usr/local/lib -mno-cygwin /usr/local/lib/libfltk_images.a
> -lpng /usr/local/lib/libfltk.a -lole32 -luuid -lcomctl32 -lwsock32
>
> (comment: --ldstaticflags is bad. Note absence of -lz and -ljpeg from
> list. Also, ideally it would explicitly call libpng.a etc to get a fully
> static link...)
[...]
> Is anybody else seeing this behaviour? I can't recall when I last built
> this project using fltk-1.1 so have no idea when this last worked, or
> when it became broken.
A quick check here with fltk 1.1 and _cygwin_ looks okay:
$ ./fltk-config --use-images --ldflags
-L./lib -mwindows -mno-cygwin -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg
-lfltk -ldl -lole32 -luuid -lcomctl32 -lwsock32
$ ./fltk-config --use-images --ldstaticflags
-mwindows -mno-cygwin ./lib/libfltk_images.a ./lib/libfltk_png.a
./lib/libfltk_z.a -lz ./lib/libfltk_jpeg.a -ljpeg ./lib/libfltk.a -ldl -lole32
-luuid -lcomctl32 -lwsock32
However, it is somewhat strange that there are both lib options,
e.g. ./lib/libfltk_jpeg.a *and* -ljpeg
I could compile and link the cube image texture demo without problems,
but I didn't use any "static" options, just this:
$ ../../fltk-1.1/fltk-config --use-images --use-gl --compile \
image-texturemapped-cube.cxx
g++ -I../../fltk-1.1 -I../../fltk-1.1/png -I../../fltk-1.1/zlib
-I../../fltk-1.1/jpeg -mwindows -DWIN32 -mno-cygwin -o image-texturemapped-cube
image-texturemapped-cube.cxx -mwindows -mno-cygwin
../../fltk-1.1/lib/libfltk_images.a ../../fltk-1.1/lib/libfltk_png.a
../../fltk-1.1/lib/libfltk_z.a -lz ../../fltk-1.1/lib/libfltk_jpeg.a -ljpeg
../../fltk-1.1/lib/libfltk_gl.a -lglu32 -lopengl32 ../../fltk-1.1/lib/libfltk.a
-ldl -lole32 -luuid -lcomctl32 -lwsock32
Okay, the double libs look strange, too, but it works (especially
because I don't build shared libs).
This is my fltk 1.1 configuration:
Directories: prefix=/usr/local/fltk-1.1
bindir= ...
Graphics: GDI
Image Libraries: JPEG=Builtin
PNG=Builtin
ZLIB=Builtin
Large Files: NO
OpenGL: YES
Threads: YES
However, I didn't "make install", I used the source dir to link.
There must be something different WRT MinGW / Cygwin.
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev