Originally posted by: Soheilmn
Hi,
I have recently switched from Windows to Mac OS X El Capitan (Version 10.11.5) and have installed CPLEX 12.5.1 via the terminal window using ./cplex_studio1251.osx.bin command. The installation has gone smoothly with no error/warning messages. Both Eclipse and CPLEX are 64bit versions. (I can spot the folder IBM/ILOG/CPLEX_Studio1251/cplex/lib/x86-64_osx, so I assume it is 64bit version.)
In Eclipse, I have introduced the header paths to GCC C++ Compiler, which are
-
IBM/ILOG/CPLEX_Studio1251/concert/include, and
-
IBM/ILOG/CPLEX_Studio1251/concert/include.
Also, I have set the linker search paths for the GCC C++ Linker as
-
IBM/ILOG/CPLEX_Studio1251/concert/lib/x86-64_osx/static_pic, and
-
IBM/ILOG/CPLEX_Studio1251/concert/lib/x86-64_osx/static_pic.
Finally, I have set one miscellaneous flags, which is "-DIL_STD."
To test my installation, I have written the following simple code.
------------------------------------------------------------------------------------------------
#include <iostream>
#include <ilcplex/ilocplex.h>
using namespace std;
ILOSTLBEGIN
int main() {
IloEnv env;
env.out() << "IBM CPLEX functions properly." << endl;
return 0;
}
------------------------------------------------------------------------------------------------
However, I get a long error message (rooting from C++ linker, I guess), which is basically complaining about not finding the symbols for architecture x86_64. (I have attached an RTF file containing the build log file.)
------------------------------------------
Undefined symbols for architecture x86_64:
"IloEnv::IloEnv()", referenced from:
_main in Test1-6472a6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-------------------------------------------
While the error seems to be related to having different versions of CPLEX, Eclipse, and OSX, I don't understand the issue because I am sure that the OS is indeed 64bit, Eclipse offers only 64bit version of its IDEs for Mac, and CPLEX is also available in 64bit version for Mac users (and as I explained, there are only x86_64 folders in related library folders in my CPLEX installation).
Has anyone run into similar problem? I highly appreciate any help.
#CPLEXOptimizers#DecisionOptimization