Originally posted by: SystemAdmin
Hello,
I'm trying to run the C++ examples on Linux, but I'm getting a lot of errors. Does anyone have a clue of where can I find a running example that compiles on GCC?
I try to compile the warehouse.cpp example. First, I had to remove a lot of ".h" from the includes (e.g., the iostream.h include). Now I'm getting a lot of errors
My goal is to run a model using static linked libraries. Any ideas?
The erros that I'm getting:
Thank you!
/usr/include/c++/4.6/backward/backward_warning.h|33|warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
-Wcpp|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|598|error: ‘ostream’ has not been declared|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|614|error: ‘ostream’ has not been declared|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|640|error: ‘ostream’ does not name a type|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|646|error: ‘ostream’ does not name a type|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|675|error: ‘ostringstream’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|675|note: suggested alternative:|
/usr/include/c++/4.6/iosfwd|150|note: ‘std::ostringstream’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilosys.h|675|error: ‘stream’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In member function ‘void* IloMemoryManager::alloc(size_t) const’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|113|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|113|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|113|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|113|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In member function ‘void IloMemoryManager::free(void*, size_t) const’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|117|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|117|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|117|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|117|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In member function ‘void IloMemoryManager::saveValue(void**) const’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|121|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|121|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|121|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|121|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In member function ‘void IloMemoryManager::saveValue(IloInt*) const’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|125|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|125|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|125|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|125|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In member function ‘void IloMemoryManager::saveValue(IloNum*) const’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|129|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|129|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|129|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|129|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In function ‘void* operator new(size_t, const IloMemoryManager&)’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|136|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|136|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|136|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|136|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h||In function ‘void* operator new [](size_t, const IloMemoryManager&)’:|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|146|error: ‘cerr’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|146|note: suggested alternative:|
/usr/include/c++/4.6/iostream|63|note: ‘std::cerr’|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|146|error: ‘endl’ was not declared in this scope|
/home/...../Test1/opl_interfaces/cpp/src/ilconcert/ilomemmgr.h|146|note: suggested alternative:|
/usr/include/c++/4.6/ostream|543|note: ‘std::endl’|
|
More errors follow but not being shown.
|
|
Edit the max errors limit in compiler options...
|
|
=== Build finished: 50 errors, 1 warnings ===
|
#CPLEXOptimizers#DecisionOptimization