1.3.1 warnings / build errors for msys2 mingw64

6 views
Skip to first unread message

Spacen

unread,
Aug 11, 2016, 6:59:06 AM8/11/16
to fltk.general
The 32 bit msys2 compiler compiler works fine with FLTK. The 64 bit compiler, however, does not like some of the integer / pointer casts, issues warnings when building the FLTK libraryes, and errors when building the examples.


Using msys2, and gcc 6.1.0 64 bit:

pacman -S mingw64/mingw-w64-x86_64-gcc make
PATH=$PATH:/mingw64

$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-6.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 6.1.0 (Rev1, Built by MSYS2 project)

Building the examples gives errors:


user@host MINGW64 /c/temp/src/fltk-1.3.3-source/fltk-1.3.3/examples
$make
...
howto-add_fd-and-popen.cxx:66:50: error: invalid conversion from 'void (*)(int, void*)' to 'Fl_FD_Handler {aka void (*)(long long unsigned int, void*)}' [-fpermissive]
...

compling with -fpermissive seems to work, but would be better if it wasn't required.

Note that there are multiple warnings about int -> pointer casts when bulding FLTK libraries. These should probably have casts added if they are safe.
Reply all
Reply to author
Forward
0 new messages