I use Visual C++ 2010 express to create C++ programs. Now I need to work with CPLEX and I have download the 90 day trial from the IBM website. However, I don't get the cplex working.
I already followed the steps given on internet (http://hassanbaalbakiblog.blogspot.nl/2011/06/configure-visual-studio-c-2008-express.html). I also include the header files.
At the properties page I have changed the following:
C/C++ > Preprocessor > Preprocessor Definitions
Here I add IL_STDC/C++ > Code generation > Runtime Library
set the value to Multi-threaded (/MT)C/C++ > General > Additional Include Directories
C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\concert\include
C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\cplex\includeLinker > Input > Additional Depencdencies: C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\cplex\lib\x64_windows_vs2010\stat_mta\cplex1260.lib
C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\cplex\lib\x64_windows_vs2010\stat_mta\ilocplex.lib
C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\concert\lib\x64_windows_vs2010\stat_mta\concert.libConfiguration Set this to Active(Release)
When I don't create the ilo environment it is working, however, when I add the ilo environment I get the following error:
1>cplex_test.obj : error LNK2001: unresolved external symbol "public: __thiscall IloEnv::IloEnv(void)" (??0IloEnv@@QAE@XZ)
1>C:\Users\Michiel\Documents\Visual Studio 2010\Projects\cplex_test\Release\cplex_test.exe : fatal error LNK1120: 1 unresolved externals
How can I get the cplex working?
#include "stdafx.h"
#include <iostream>
#include "C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\cplex\include\ilcplex\cplex.h"
#include "C:\Program Files\IBM\ILOG\CPLEX_Studio_Preview126\cplex\include\ilcplex\ilocplex.h"
using namespace std;
int main() {
IloEnv env; //this line causes the error
cin.get();
return 0;
}