[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Compiling and linking problems
From: |
Heinrich Schuchardt |
Subject: |
Re: [Help-glpk] Compiling and linking problems |
Date: |
Sat, 17 Mar 2018 00:23:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hello Mike,
https://stackoverflow.com/questions/6394512/standard-c-library-in-mingw
writes:
"MinGW is designed to build native Windows code, and as such it builds
against Windows' native libc."
So probably you want to change this line in src/env/stdc.c:
-#elif defined(__WOE__)
+#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WOE__)
Please, reply if this works. Then Andrew could update it in the next
version of GLPK.
There might be more lines needing such a change:
examples/glpsol.c:956:#ifndef __WOE__
src/env/time.c:88:#elif defined(__WOE__)
src/env/dlsup.c:107:#elif defined(__WOE__)
src/env/tls.c:85:#ifdef __WOE__
src/env/stdc.c:52:#elif defined(__WOE__)
Best regards
Heinrich
On 03/15/2018 02:35 PM, address@hidden wrote:
> 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
>
> gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
>
>
>
>
>
> Any suggestions are welcome!
>
>
>
> Thanks,
>
>
>
> Mike
>
>
>
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
- [Help-glpk] Compiling and linking problems, mike.steglich, 2018/03/15
- Re: [Help-glpk] Compiling and linking problems, Nigel Galloway, 2018/03/16
- Re: [Help-glpk] Compiling and linking problems, Chris Matrakidis, 2018/03/16
- Re: [Help-glpk] Compiling and linking problems,
Heinrich Schuchardt <=
- Re: [Help-glpk] Compiling and linking problems, Chris Matrakidis, 2018/03/16
- Re: [Help-glpk] Compiling and linking problems, mike.steglich, 2018/03/17
- Re: [Help-glpk] Compiling and linking problems, Chris Matrakidis, 2018/03/17
- Re: [Help-glpk] Compiling and linking problems, Mike Steglich, 2018/03/17
- Re: [Help-glpk] Compiling and linking problems, Mike Steglich, 2018/03/17
- Re: [Help-glpk] Compiling and linking problems, Chris Matrakidis, 2018/03/17
- Re: [Help-glpk] Compiling and linking problems, mike.steglich, 2018/03/18
Re: [Help-glpk] Compiling and linking problems, Marco Atzeri, 2018/03/17