<html><head></head><body><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div>So you may try to edit this file.</div><div><br></div><div>Any feedback (or update of FindCPLEX.cmake) is very welcome.</div><div><br></div><div>Regards,</div><div>Alpár</div><div><br></div><div><br></div><div>On Fri, 2017-11-17 at 19:40 +0100, Noel Farrugia wrote:</div><blockquote type="cite"><div dir="ltr">Hi all, <div><br></div><div>I am trying to use LEMON in conjunction with CPLEX 12.71 however when I am compiling my program I am getting the error:</div><div><div><br></div><div>error: ‘CplexLp’ does not name a type</div><div> typedef CplexLp Lp;</div></div><div><br></div><div>To solve this error I included the CplexLp header file before the general Lp header file in one of my header files like so:</div><div><br></div><div><div><font face="monospace, monospace">#include <lemon/cplex.h></font></div><div><font face="monospace, monospace">#include <lemon/lp.h></font></div></div><div><br></div><div>However, when I try to compile my program I now get a list of errors similar to the following:</div><div><br></div><div><div><font face="monospace, monospace">cplex.cc:(.text+0x2b1): undefined reference to `CPXfreeprob'</font></div><div><font face="monospace, monospace">cplex.cc:(.text+0x2c4): undefined reference to `CPXcreateprob'</font></div></div><div><br></div><div>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:</div><div><br></div><div><font face="monospace, monospace">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/include/ ..</font><br></div><div><br></div><div>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?</div><div>I think that the issue is with LEMON and not my developed application because my application compiles correctly when using GLPK.</div><div><br></div><div>Do not hesitate to contact me should you require further information.</div><div>Thanks a lot for your time. Much appreciated.</div><div>Kind Regards,</div><div>Noel</div></div>
<pre>_______________________________________________
Lemon-user mailing list
<a href="mailto:Lemon-user@lemon.cs.elte.hu">Lemon-user@lemon.cs.elte.hu</a>
<a href="http://lemon.cs.elte.hu/mailman/listinfo/lemon-user">http://lemon.cs.elte.hu/mailman/listinfo/lemon-user</a>
</pre></blockquote></body></html>