Dear GLPK-Team,
I have got some problems with building glpk 4.65 on Windows 10 with msys/mingw.
I tried to build it with:
./configure --enable-static --disable-shared
make
Configure finished without problems. All sources are compiled without errors.
But it ends with the following issues:
…
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o glpsol.exe glpsol.o ../src/
libglpk.la -lm
libtool: link: gcc -g -O2 -o glpsol.exe glpsol.o ../src/.libs/libglpk.a
../src/.libs/libglpk.a(libglpk_la-stdc.o): In function `glp_xgmtime':
C:\Users\Mike\Documents\Projekte\CMPL-1-12\Cmpl\data\glpk-4.65\src/env/stdc.c:81: undefined reference to `gmtime_r'
../src/.libs/libglpk.a(libglpk_la-stdc.o): In function `glp_xstrtok':
C:\Users\Mike\Documents\Projekte\CMPL-1-12\Cmpl\data\glpk-4.65\src/env/stdc.c:93: undefined reference to `strtok_r'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [glpsol.exe] Error 1
make[2]: Leaving directory `/Documents/Projekte/CMPL-1-12/Cmpl/data/glpk-4.65/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Documents/Projekte/CMPL-1-12/Cmpl/data/glpk-4.65'
make: *** [all] Error 2
I have seen that in stdc.c are alternative versions of some function depending on some defines. But I am not sure what is do do. I was wondering that the defines are set by the configure script.
I use as mentioned before msys/mingw:
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='
MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
Any suggestions are welcome!
Thanks,
Mike