Do you type this syntax in the terminal
also where do you create the main.cpp and how do you run it ??
as i have installed cplex on linux and i am trying to run the file on visual studio code, it fails, the make blend runs fine and provides the list of dependencies for me
g++ -c -m64 -fPIC -fno-strict-aliasing -fexceptions -DNDEBUG -I../../../include -I../../../../concert/include ../../../examples/src/cpp/blend.cpp -o blend.o
g++ -m64 -fPIC -fno-strict-aliasing -fexceptions -DNDEBUG -I../../../include -I../../../../concert/include -L../../../lib/x86-64_linux/static_pic -L../../../../concert/lib/x86-64_linux/static_pic -o blend blend.o -lconcert -lilocplex -lcplex -lm -lpthread -ldl
when i run make blend on the linux terminal and after changing the directory cd
------------------------------
Omar Elsherif
------------------------------
Original Message:
Sent: Thu January 21, 2021 06:35 AM
From: affernan
Subject: Linking error in program using CPLEX C++ API on Linux
Hello Vincent,
Thanks for your comments. I saw the examples files like makefile and I understand several components for my syntax, and also including additional libraries at last of my line like -ldl.
This my line (work fine):
g++ -std=gnu++11 -O0 -m64 -O -fPIC -fno-strict-aliasing -fexceptions -DNDEBUG -DIL_STD main.cpp vrp.cpp vrp.h -I/opt/ibm/ILOG/CPLEX_Studio129/cplex/include -I/opt/ibm/ILOG/CPLEX_Studio129/concert/include -L/opt/ibm/ILOG/CPLEX_Studio129/cplex/lib/x86-64_linux/static_pic -L/opt/ibm/ILOG/CPLEX_Studio129/concert/lib/x86-64_linux/static_pic -o hardprogram -lconcert -lilocplex -lcplex -lm -lpthread -ldl
regards,
Alex
------------------------------
affernan
Original Message:
Sent: Wed January 20, 2021 07:29 AM
From: Vincent Beraudier
Subject: Linking error in program using CPLEX C++ API on Linux
I guess you miss the libraries themselves:-lconcert
-lcplex2010
------------------------------
Vincent Beraudier
Original Message:
Sent: Sun January 17, 2021 08:01 AM
From: affernan
Subject: Linking error in program using CPLEX C++ API on Linux
Hello Dear, I am using the C ++ API for CPLEX 12.9 in Linux / Centos and I perform the execution and linking of the dependencies as follows:
g++ -std=c++11 main.cpp vrp.cpp vrp.h -I/opt/ibm/ILOG/CPLEX_Studio129/cplex/include -I/opt/ibm/ILOG/CPLEX_Studio129/concert/include -L/opt/ibm/ILOG/CPLEX_Studio129/cplex/lib/x86-64_linux/static_pic -L/opt/ibm/ILOG/CPLEX_Studio129/concert/lib/x86-64_linux/static_pic -o hardprogram
But I cannot generate the compiled one I get several errors. Will I be linking the dependencies well?
regards!
------------------------------
affernan
------------------------------
#DecisionOptimization