[Lemon-user] Using Lemon with CPLEX 12.71

Alpar Juttner alpar at cs.elte.hu
Mon Nov 27 10:09:36 CET 2017


Hi,
The problem with the automatic detection of CPLEX is that it puts the
headers and libs into different folders for different versions and I
could not find a way to automatically guess the default location. It is
hard coded up to version 12.3 in the file cmake/FindCPLEX.cmake.
So you may try to edit this file.
Any feedback (or update of FindCPLEX.cmake) is very welcome.
Regards,
Alpár
On Fri, 2017-11-17 at 19:40 +0100, Noel Farrugia wrote:
> Hi all, 
> 
> I am trying to use LEMON in conjunction with CPLEX 12.71 however when
> I am compiling my program I am getting the error:
> 
> error: ‘CplexLp’ does not name a type
>    typedef CplexLp Lp;
> 
> To solve this error I included the CplexLp header file before the
> general Lp header file in one of my header files like so:
> 
> #include <lemon/cplex.h>
> #include <lemon/lp.h>
> 
> However, when I try to compile my program I now get a list of errors
> similar to the following:
> 
> cplex.cc:(.text+0x2b1): undefined reference to `CPXfreeprob'
> cplex.cc:(.text+0x2c4): undefined reference to `CPXcreateprob'
> 
> I have a hunch that when I am compiling LEMON the CPLEX library is
> not being linked correctly; however, when I build Lemon no errors are
> reported. The command I used to compile LEMON is:
> 
> cmake -DCMAKE_INSTALL_PREFIX=$HOME/libraries/lemon 
> -DILOG_CPLEX_INCLUDE_DIR=$HOME/ILOG/CPLEX_Studio1271/cplex/include/ 
> -DILOG_CPLEX_LIBRARY=$HOME/ILOG/CPLEX_Studio1271/cplex/lib/x86
> -64_linux/static_pic/libcplex.a 
> -DILOG_CONCERT_LIBRARY=$HOME/ILOG/CPLEX_Studio1271/concert/lib/x86
> -64_linux/static_pic/libconcert.a 
> -DILOG_CONCERT_INCLUDE_DIR=$HOME/ILOG/CPLEX_Studio1271/concert/includ
> e/ ..
> 
> I had to pass all of the directories as parameters because otherwise
> Lemon would not detect them all correctly automatically. Does anyone
> have any pointers what could be the issue please?
> I think that the issue is with LEMON and not my developed application
> because my application compiles correctly when using GLPK.
> 
> Do not hesitate to contact me should you require further information.
> Thanks a lot for your time. Much appreciated.
> Kind Regards,
> Noel
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20171127/35a1a6b8/attachment.html>


More information about the Lemon-user mailing list