[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] [Fwd: Build glpk as a shared library on Cygwin, MinGW an

From: marco atzeri
Subject: Re: [Help-glpk] [Fwd: Build glpk as a shared library on Cygwin, MinGW and similar systems]
Date: Mon, 10 Dec 2012 20:34:38 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/10/2012 8:20 PM, Andrew Makhorin wrote:
-------- Forwarded Message --------
From: Jean-Pierre Flori <address@hidden>
To: address@hidden
Subject: Build glpk as a shared library on Cygwin, MinGW and similar
Date: Mon, 10 Dec 2012 19:20:19 +0100

Dear all,

First thanks for this great library.

I'd like to be able to build glpk as a shared library on Cygwin and MinGW.
But on such system (and surely others), libtool will refuse without some help.

Would you consider adding the "-no-undefined" flag to
"libglpk_la_LDFLAGS" in src/
This flag is needed under such systems to
promise libtool that the linker won't encounter undefined symbols at
link time.
Without it, recent (since some years) versions of libtool just don't
even try linking and fall back to only making static libraries.
(See for some doc.)

This flag should be harmless on other systems, but you could also only
add it conditionally on the fact the build is performed on Cygwin or others
(e.g. check __CYGWIN__, surely some autotools magic does it as well,
using some case $host in .... *-cygwin or something like that)
and/or that a shared version is being built.

The corresponding piece of code in MPIR is here:

For MPFR, you can have a look here:
The solution is similar.



glpk is already available as shared library on cygwin

$ cygcheck -c -d |grep glpk
glpk                                     4.47-1
libglpk-devel                            4.47-1
libglpk0                                 4.47-1

and of course is configured with "LDFLAGS=-no-undefined"

Why do you need to build it again ?
Something missing on my build ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]