FLTK logo

[fltk.general] Compiling under mingw - error with zlib.h

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Compiling under mingw - error with zlib.h "'pvr... Nov 15, 2022  
 
I am trying to compile the latest from scratch under MSYS/MINGW64.

The mingw64 installation has system zlib. The compile fails as this has ZLIB_VERNUM = 0x12d0 wheras FLTK PNG requires 0x12b0.

I have tried to run Cmake with OPTION_USE_SYSTEM_OFF=OFF and it still fails.

I have moved the MINGSW zlib.h out of the way and it fails not being able to find zlib.h as if the include library is still looking in the mingw64 directory rather than in the fltk files.

In my MINGW window I gave run

git clone https://github.com/fltk/fltk.git
mkdir -p build/Debug
cd build/Debug
cmake -G "Unix Makefiles" -D 'CMAKE_BUILD_TYPE=Debug' -DCMAKE_SYSTEM_NAME="Windows" -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_LIBPNG=OFF ../..
make

and it fails in make. After compiling fltk_zlib and fltk_jpeg it fails on the first png file. I found the order of the defines to be sigificant - setting zLIB after the other two was ignored and the mingsw zlib found instead.

The fail (using make -d) was:-

[ 11%] Building C object png/CMakeFiles/fltk_png.dir/png.c.obj
Reaping winning child 0x800088250 PID 4159
Live child 0x800088250 (png/CMakeFiles/fltk_png.dir/png.c.obj) PID 4160
In file included from C:/users/pvros/dev/fltk/png/png.c:14:
C:/users/pvros/dev/fltk/png/pngpriv.h:920:4: error: #error ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
  920 | #  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
      |    ^~~~~
Reaping losing child 0x800088250 PID 4160
make[2]: *** [png/CMakeFiles/fltk_png.dir/build.make:77: png/CMakeFiles/fltk_png.dir/png.c.obj] Error 1

Thanks Phil

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/35501cbc-7721-4e44-8613-8515c3fc28f8n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.