Originally posted by: MichaelD.Moffitt
Hello all,
I am trying to compile one of the CPLEX examples C++ (ilomipex1.cpp). I have tried using two different versions of g++.
gcc version 4.1.0 20060515 (Red Hat 4.1.0-18)
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
Unfortunately, I receive the following cryptic error. Searching the internet suggests something about libraries generated from incompatible versions of g++ ... but alas, I'm just using what came with my CPLEX distribution.
Can anyone help?
Command:
g++4 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/cplex121/include -I/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/concert29/include ilomipex1.cpp -L/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/cplex121/lib/x86-64_debian4.0_4.1/static_pic/ -lilocplex -lcplex -L/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/concert29/lib/x86-64_debian4.0_4.1/static_pic/ -lconcert -lm -lpthread -o executable
Output:
http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(ilocplex.o)(.text+0x21816): In function `IloCplexI::IloCplexI(IloEnvI*)':
: undefined reference to `__cxa_get_exception_ptr'
http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(ilocplex.o)(.text+0x24ed6): In function `IloCplexI::IloCplexI(IloEnvI*)':
: undefined reference to `__cxa_get_exception_ptr'
http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(iloexpr.o)(.text+0x2efb): In function `IloExprParser::extract(IloNumExprI const*)':
: undefined reference to `__cxa_get_exception_ptr'
http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x5661): In function `IloAlgorithmI::apply(IloChange const&, IloExtractableI const*)':
: undefined reference to `__cxa_get_exception_ptr'
http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x577b): In function `IloAlgorithmI::apply(IloChange const&, IloExtractableI const*)':
: undefined reference to `__cxa_get_exception_ptr'
http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x59cb): more undefined references to `__cxa_get_exception_ptr' follow
collect2: ld returned 1 exit status
#CPLEXOptimizers#DecisionOptimization