[Coin-discuss] problem with OSI and CPLEX on MinGW+MSYS

Michal Kaut mail at michalkaut.net
Wed May 23 09:30:18 EDT 2007


Hello,

I have had a problem with the OSI configure script, when using Cplex 9.0 
library, on Windows with MinGW+MSYS. I managed to localize the problem 
and find the way around it, but I still do not know what the problem is 
and how to correct it - and, most importantly, whether it is a problem 
with my GCC/MinGW/MSYS configuration or a general issue.

Anyway, I just thought that someone else might find the "solution" useful...


1. The problem
I run ./configure -C, with the following options in a config.site file:
with_cplex_incdir=/g/Cplex90/include/ilcplex
with_cplex_lib="-L/g/Cplex90/lib/msvc6/stat_mda -lcplex90"
The script stops with an error; The last few lines of output are:
checking if user provides library for Cplex... yes
checking for /g/Cplex90/include/ilcplex/cplex.h... yes
checking whether symbol CPXgetstat is available with CPX... no
configure: error: Cannot find symbol CPXgetstat with CPX
configure: error: /bin/sh './configure' failed for Osi

2. Localizing the problem
The error comes from configure in the Osi directory, from testing the 
CPLEX library. For this test, configure creates a file conftest.c, which 
won't link, causing the error. The error message from the linker is
"conftest.c: undefined reference to `CPXgetstat'".
I tried to build the file manually, with the same result.

3. Way around the problem
It turns out that the configure script configures everything OK, i.e. 
the problem is in the test file conftest.c, not in the configuration.
The "solution" is therefore to skip the test, by supplying an option 
"--disable-cplex-libcheck" to the configure script.
This way, both the 'configure', 'make' and 'make test' works without 
further problems, as do the Osi examples...


Regards,
Michal Kaut



More information about the Coin-discuss mailing list