rasul
rasul

Reputation: 1119

GCC/G++ warnings when using CPLEX 12.8

I use CPLEX 12.8 and c++ to code a benders decomposition algorithm. When I use clang++ compiler there is no error. However, when I use g++ the following error occurs:

In file included from /opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex/ilocplexi.h:1053:0, from /opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex/ilocplex.h:29,
from PARAM.h:12, from MAIN.cpp:1: /opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex/iloparam.h:83:12: warning: ‘IloCplex::Param::MIP::Limits::SubMIPNodeLim’ is deprecated [-Wdeprecated-declarations] struct Limits { ^ /opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex/iloparam.h:103:40: note: declared here static const IloCplex::LongParam SubMIPNodeLim = LongParam(CPX_PARAM_SUBM

I do not use SubMIPNodeLim in my code, so I don't understand why I am receiving this warning. Although g++ produces this kind of warning, it also compiles the code and I can see the results. However, when I use gcc it does not show any results and terminates with a long list of errors. Could you please let me know what is wrong here?

Upvotes: 0

Views: 639

Answers (1)

rkersh
rkersh

Reputation: 4465

The parameter warning is only meant to be informative; the parameter in question is defined in the ilcplex/iloparam.h header file (which is included indirectly via ilcplex/ilocplex.h), so you'll see that warning even if you aren't using it directly. You can read more information about the deprecated parameter in the 12.8 release notes here. If you want, you can use the -Wno-deprecated compiler option to silence the warning (i.e., see the documentation here).

You can use gcc to compile C++ code, but you are likely getting a linker error (e.g., see this stackoverflow thread). However, using g++ should make your life easier.

Upvotes: 2

Related Questions