I have written a C++ code that calls a solver called CPLEX to solve an integer linear optimization problem (under Ubuntu 18.04). I have three sets of data and I use
make command to create 3 excecutables for each one of them. I then run these three executables at the same time.
My question is, does the fact that CPLEX libraries are used to create object files and the executable means that the excecutables will use CPLEX in the run time? In other words, is calling CPLEX a one-time procedure that is required only at the time of generating executables? If this is not the case, then running the three programs at the same time may not work or if it works it may affect the performance because they want to use CPLEX at the same time. Is that correct? What about using CPLEX with an interpreted programming language such as Python? I am not quite familiar with compilers or interpreters so some general explanation on how this works would be appreciated.
.cpp source code starts with the following:
#include <iostream> #include <fstream> #include <time.h> #include <math.h> #include <vector> #include <random> #include <algorithm> #include <iomanip> #include <string> #include <stdlib.h> #include <deque> #include <ilcplex/ilocplex.h> using namespace std ;
So all I do is add
#include <ilcplex/ilocplex.h> to my source code to be able to use CPLEX libraries withing my code. In other words, my code is just a typical C++ code that uses some additional methods from CPLEX. I could provide more details about using CPLEX withing the code but I think it is irrelevant here and it does not contribute to clarity of the question. Please let me know if you need more information to understand the question.
According to this link,
When you compile a C++ application with a C++ library like CPLEX in Concert Technology, you need to tell your compiler where to find the CPLEX and Concert include files (that is, the header files), and you also need to tell the linker where to find the CPLEX and Concert libraries. The sample projects and makefiles illustrate how to carry out these crucial steps for the examples in the standard distribution. They use relative path names to indicate to the compiler where the header files are, and to the linker where the libraries are.