Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

  • 1.  How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Sun November 03, 2013 07:35 PM

    Originally posted by: andari20


    Hi everyone,

    I am just moving to C++ from Java, and I've had problems setting up netbeans. I will appreciate any help from you with the step-by-step process.

    Thanks a lot!! 


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 03:30 AM

    What you have to do is to setup the compiler and linker flags properly. here is a thread that does a similar setup for eclipse. Notice however that this thread is for an older version of CPLEX. To see what flags to use to compile and link CPLEX applications go to directory cplex/examples/x86-64_osx/static_pic and run

    make blend

    This compiles and links the blend example. The command will display the commands used for compiling and linking. From this output it should be easy to pick up the flags you need to provide and add them to netbeans (I don't know netbeans so I don't where to add those flags in netbeans).


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 09:55 AM

    Originally posted by: andari20


    Thanks Daniel for your help. Unfortunately I still have problems :(

    Below you'll find some pictures showing what I did, and the error message from the output window was

     

    "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    "/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/pruebacplex
    mkdir -p build/Debug/GNU-MacOSX
    rm -f build/Debug/GNU-MacOSX/main.o.d
    g++    -c -g -I../../Applications/IBM/ILOG/CPLEX_Studio125/cplex/include -I../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include -MMD -MP -MF build/Debug/GNU-MacOSX/main.o.d -o build/Debug/GNU-MacOSX/main.o main.cpp
    In file included from main.cpp:33:
    In file included from ../../Applications/IBM/ILOG/CPLEX_Studio125/cplex/include/ilcplex/ilocplex.h:27:
    In file included from ../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include/ilconcert/ilomodel.h:21:
    In file included from ../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include/ilconcert/iloalg.h:21:
    In file included from ../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include/ilconcert/iloenv.h:21:
    ../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include/ilconcert/ilosys.h:374:10: fatal error: 'iostream.h' file not found
    #include <iostream.h>
             ^
    1 error generated.
    make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
     
     

    BUILD FAILED (exit value 2, total time: 1s)

     

     

    I think that I'm missing something... but I can't figure out what it is.

    Thanks again! 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 10:01 AM

    Originally posted by: T_O


    Maybe you have to define the symbol IL_STD .

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 10:58 AM

    Originally posted by: andari20


    where do I have to define that symbol?? Thanks a lot =)

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 11:01 AM

    Originally posted by: T_O


    I neither use Netbeans nor OS X. Typically, you do something like g++ -DIL_STD , but I think someone else will have to tell you how to do this in your environment.

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon November 04, 2013 01:53 PM

    I don't know netbeans but from your cpp_compiler.jpg picture I guess that you need to put -DIL_STD into the "Preprocessor Definitions"  of the "C++-Compiler" tab. Also note that using relative include paths may not be a good idea. This assumes that your compiler is invoked in a certain place. I suggest to use absolute paths instead. Just to avoid trouble.


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Tue November 05, 2013 04:04 PM

    Originally posted by: andari20


    Hi Daniel,

    I put the symbol IL-STD in the preprocessor definitions flag, but I still got the error message. One thing I don get it is why ilosys.h is looking for a iostream.h file

    "... ../../Applications/IBM/ILOG/CPLEX_Studio125/concert/include/ilconcert/ilosys.h:374:10: fatal error: 'iostream.h' file not found"

     

    Then I tried putting

    #include <iostream> on the top of my code but the error is still there.  :( 

     

     

    Thanks a lot for your time guys!

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Tue November 05, 2013 05:38 PM

    Originally posted by: T_O


    It is IL_STD , not IL-STD .

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Wed November 06, 2013 01:18 PM

    Originally posted by: andari20


    Sorry... that was my mistake...

    I fixed it... but now I got the message below. Any ideas???

    Thank you guys... although I'm still having trouble with this, I think I'm getting closer ;)

     

    "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf

    "/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/cplextest

    mkdir -p build/Debug/GNU-MacOSX

    rm -f build/Debug/GNU-MacOSX/main.o.d

    g++    -c -g -DIL_STD -I/Users/andreaarias/Applications/IBM/ILOG/CPLEX_Studio125/cplex/include -I/Users/andreaarias/Applications/IBM/ILOG/CPLEX_Studio125/concert/include -MMD -MP -MF build/Debug/GNU-MacOSX/main.o.d -o build/Debug/GNU-MacOSX/main.o main.cpp

    mkdir -p dist/Debug/GNU-MacOSX

    g++     -o dist/Debug/GNU-MacOSX/cplextest build/Debug/GNU-MacOSX/main.o -L/Users/andreaarias/Applications/IBM/ILOG/CPLEX_Studio125/cplex/lib/x86-64_darwin/static_pic -L/Users/andreaarias/Applications/IBM/ILOG/CPLEX_Studio125/concert/lib/x86-64_darwin/static_pic

    Undefined symbols for architecture x86_64:

      "IloNumExpr::IloNumExpr(IloNumExprArg)", referenced from:

          IloNumVarArray::add(IloNumVar) in main.o

      "IloNumArray::IloNumArray(IloEnv, long)", referenced from:

          _main in main.o

      "IloAddNumVar::~IloAddNumVar()", referenced from:

          IloAddValueToObj::~IloAddValueToObj() in main.o

          IloAddValueToRange::~IloAddValueToRange() in main.o

      "IloObjective::setLinearCoef(IloNumVar, double)", referenced from:

          populatebynonzero(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "IloObjective::IloObjective(IloEnv, double, IloObjective::Sense, char const*)", referenced from:

          IloMaximize(IloEnv, double, char const*) in main.o

      "IloObjectiveI::IloObjectiveI(IloEnvI*, IloNumExprI*, IloObjective::Sense, char const*)", referenced from:

          IloObjective::IloObjective(IloEnv, IloNumExprArg, IloObjective::Sense, char const*) in main.o

      "IloExtractableI::setName(char const*)", referenced from:

          IloExtractable::setName(char const*) const in main.o

      "IloAddValueToObj::IloAddValueToObj(IloObjective, double)", referenced from:

          IloObjective::operator()(double) in main.o

      "IloAllocationList::alloc(long)", referenced from:

          IloMemory::alloc(long) in main.o

          IloFixedSizeAllocatorI::allocate(IloMemory*) in main.o

      "IloMemoryException::IloMemoryException()", referenced from:

          IloMemory::getIndex(long) const in main.o

      "IloMemoryException::~IloMemoryException()", referenced from:

          IloMemory::getIndex(long) const in main.o

      "IloExtractableArray::add(IloExtractable)", referenced from:

          IloRangeArray::add(IloRange) in main.o

          IloNumExprArray::add(IloNumExpr) in main.o

      "IloExtractableArray::IloExtractableArray(IloEnv, long)", referenced from:

          IloConstraintArray::IloConstraintArray(IloEnv, long) in main.o

          IloNumExprArray::IloNumExprArray(IloEnv, long) in main.o

      "IloFixedSizeAllocatorI::allocateBlock(IloMemory*)", referenced from:

          IloFixedSizeAllocatorI::allocate(IloMemory*) in main.o

      "IloEmptyHandleException::IloEmptyHandleException(char const*)", referenced from:

          IloRange::setLinearCoef(IloNumVar, double) in main.o

      "IloEmptyHandleException::~IloEmptyHandleException()", referenced from:

          IloRange::setLinearCoef(IloNumVar, double) in main.o

      "IloEnvAllocationDisabled::IloEnvAllocationDisabled()", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "IloEnvAllocationDisabled::~IloEnvAllocationDisabled()", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "IloEnvAllocatorThreadMismatch::IloEnvAllocatorThreadMismatch()", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "IloEnvAllocatorThreadMismatch::~IloEnvAllocatorThreadMismatch()", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "IloEnv::IloEnv()", referenced from:

          _main in main.o

      "IloEnvI::~IloEnvI()", referenced from:

          IloEnv::end() in main.o

      "IloCplex::IloCplex(IloModel)", referenced from:

          _main in main.o

      "IloModel::IloModel(IloEnv, char const*)", referenced from:

          _main in main.o

      "IloCplexI::exportModel(char const*)", referenced from:

          IloCplex::exportModel(char const*) const in main.o

      "IloNumVar::IloNumVar(IloEnv, double, double, IloNumVar::Type, char const*)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

          populatebynonzero(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "IloNumVar::IloNumVar(IloAddNumVar const&, double, double, IloNumVar::Type, char const*)", referenced from:

          populatebycolumn(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "IloRangeI::setCoef(IloNumVar, double)", referenced from:

          IloRange::setLinearCoef(IloNumVar, double) in main.o

      "IloRangeI::IloRangeI(IloEnvI*, double, double, char const*)", referenced from:

          IloRange::IloRange(IloEnv, double, double, char const*) in main.o

      "IloAlgorithm::getObjValue() const", referenced from:

          _main in main.o

      "IloAlgorithm::solve() const", referenced from:

          IloCplex::solve() in main.o

      "IloAlgorithm::getValues(IloNumVarArray, IloNumArray) const", referenced from:

          IloCplex::getValues(IloNumArray, IloNumVarArray) const in main.o

      "IloEnvI::matchesAllocatorThread() const", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "IloModel::add(IloExtractable) const", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

          populatebycolumn(IloModel, IloNumVarArray, IloRangeArray) in main.o

          populatebynonzero(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "IloModel::add(IloExtractableArray const&) const", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

          populatebycolumn(IloModel, IloNumVarArray, IloRangeArray) in main.o

          populatebynonzero(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "IloCplexI::getReducedCosts(IloNumArray, IloNumVarArray) const", referenced from:

          IloCplex::getReducedCosts(IloNumArray, IloNumVarArray) const in main.o

      "IloCplexI::getDuals(IloNumArray, IloRangeArray) const", referenced from:

          IloCplex::getDuals(IloNumArray, IloRangeArray) const in main.o

      "IloCplexI::getSlacks(IloNumArray, IloRangeArray, long) const", referenced from:

          IloCplex::getSlacks(IloNumArray, IloRangeArray, long) const in main.o

      "typeinfo for IloException", referenced from:

          GCC_except_table0 in main.o

      "typeinfo for IloMemoryException", referenced from:

          IloMemory::getIndex(long) const in main.o

      "typeinfo for IloEmptyHandleException", referenced from:

          IloRange::setLinearCoef(IloNumVar, double) in main.o

      "typeinfo for IloEnvAllocationDisabled", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "typeinfo for IloEnvAllocatorThreadMismatch", referenced from:

          IloEnvI::alloc(unsigned long) const in main.o

      "vtable for IloAddNumVar", referenced from:

          IloAddNumVar::IloAddNumVar() in main.o

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for IloAddExtractable", referenced from:

          IloAddExtractable::IloAddExtractable() in main.o

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for IloAddValueToRange", referenced from:

          IloAddValueToRange::IloAddValueToRange(IloRangeI*, double) in main.o

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for IloRtti", referenced from:

          IloRtti::IloRtti() in main.o

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for IloChange", referenced from:

          IloChange::IloChange() in main.o

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "operator<=(IloNumExprArg, double)", referenced from:

          operator<=(IloNumExprArg, int) in main.o

      "operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, IloAlgorithm::Status)", referenced from:

          _main in main.o

      "operator-(IloNumExprArg, IloNumLinExprTerm)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "operator*(int, IloNumVar)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "operator-(IloNumVar)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "operator+(IloNumExprArg, IloNumLinExprTerm)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "operator+(IloNumExprArg, IloNumExprArg)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

      "operator+(IloNumLinExprTerm, IloNumExprArg)", referenced from:

          populatebyrow(IloModel, IloNumVarArray, IloRangeArray) in main.o

    ld: symbol(s) not found for architecture x86_64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    make[2]: *** [dist/Debug/GNU-MacOSX/cplextest] Error 1

    make[1]: *** [.build-conf] Error 2

    make: *** [.build-impl] Error 2

     

     

    BUILD FAILED (exit value 2, total time: 9s)


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Wed November 06, 2013 01:50 PM

    Originally posted by: T_O


    This is just a linker error. You have to link some libraries. I think concert, ilocplex and cplex, but I am not sure about this, because I haven't used concert for a long time.

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Thu November 07, 2013 03:17 AM

    Above I suggested to run 'make blend' and configure netbeans so that it produces the same command line? Did you do that? Running 'make blend' produces the following output for me

    clang++ -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I../../../include -I../../../../concert/include  ../../../examples/src/cpp/blend.cpp -o blend.o
    clang++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I../../../include -I../../../../concert/include  -L../../../lib/x86-64_osx/static_pic -L../../../../concert/lib/x86-64_osx/static_pic -o blend blend.o -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit

    From the second invocation of clang++ you can see that you are missing at least these linker flags:

    • -lconcert
    • -lilocplex
    • -lcplex
    • -m64
    • -lm
    • -lpthread
    • -framework CoreFoundation
    • -framework IOKit

    You need to update your netbeans configuration so that it adds them to the command line. The flags starting with '-l' are additional libraries. So to get flag '-lconcert' you probably have to specify 'concert' somewhere in the list of additional libraries.

    You should also try to use clang++ instead of g++ for compiling and linking.


    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Thu November 07, 2013 11:50 AM

    Originally posted by: andari20


    Hi Daniel,

    Yes, I did what you told me before with the blend example and this is what I got:

    g++ -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I../../../include -I../../../../concert/include  ../../../examples/src/cpp/blend.cpp -o blend.o

    g++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I../../../include -I../../../../concert/include  -L../../../lib/x86-64_darwin/static_pic -L../../../../concert/lib/x86-64_darwin/static_pic -o blend blend.o -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit

     

    Then so many lines like this one below:

     

    ld: warning: could not create compact unwind for _CPXEwriteparam: register saved more than once (might be shrink wrap)

    and finally this

    Undefined symbols for architecture x86_64:

      "IloAlgorithm::setWarning(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:

          _main in blend.o

      "IloAlgorithm::setOut(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:

          _main in blend.o

      "__gnu_cxx::__exchange_and_add(int volatile*, int)", referenced from:

          IloGetString(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          ...

      "std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const", referenced from:

          IloGetString(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) in libconcert.a(iloenv.o)

      "std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()", referenced from:

          construction vtable for std::ostream-in-IloNullStream in libconcert.a(iloenv.o)

      "std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()", referenced from:

          construction vtable for std::ostream-in-IloNullStream in libconcert.a(iloenv.o)

      "std::ostream::operator<<(void const*)", referenced from:

          IloNamedAnyPropertyI::display(std::ostream&) const in libconcert.a(iloenv.o)

          IloNamedPropertySet::NotPresent::print(std::ostream&) const in libconcert.a(iloenv.o)

          IloAlgorithm::NoObjectiveException::print(std::ostream&) const in libconcert.a(iloalg.o)

          IloAlgorithm::NotExtractedException::print(std::ostream&) const in libconcert.a(iloalg.o)

          IloAlgorithm::CannotRemoveException::print(std::ostream&) const in libconcert.a(iloalg.o)

          IloAlgorithm::CannotChangeException::print(std::ostream&) const in libconcert.a(iloalg.o)

          IloNumArrayMemberI::display(std::ostream&) const in libconcert.a(iloconstraint.o)

          ...

      "std::ostream::operator<<(double)", referenced from:

          IloNumTimesCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumDivCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumRecDivCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumMinCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumMaxCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumPowerCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloNumRecPowerCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          ...

      "std::ostream::operator<<(long)", referenced from:

          IloBoolVarDomainI::display(std::ostream&) in libconcert.a(iloexpression.o)

          IloIntModuloCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntRecModuloCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntTimesCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntDivCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntRecDivCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntMinCstI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          ...

      "std::ostream::operator<<(unsigned long)", referenced from:

          IloConversionI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloCplexI::inconsistency(int) in libilocplex.a(ilocplex.o)

      "std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:

          IloGetString(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          ...

      "std::string::_Rep::_S_empty_rep_storage", referenced from:

          IloGetString(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          ...

      "std::basic_streambuf<char, std::char_traits<char> >::sync()", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::imbue(std::locale const&)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::uflow()", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::setbuf(char*, long)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::xsgetn(char*, long)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::overflow(int)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::pbackfail(int)", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::showmanyc()", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_streambuf<char, std::char_traits<char> >::underflow()", referenced from:

          vtable for IloPrivateBuf in libconcert.a(iloenv.o)

      "std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)", referenced from:

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

      "std::locale::locale()", referenced from:

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

      "std::locale::~locale()", referenced from:

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloPrivateBuf::~IloPrivateBuf() in libconcert.a(iloenv.o)

          IloPrivateBuf::~IloPrivateBuf() in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          ...

      "std::ios_base::Init::Init()", referenced from:

          __static_initialization_and_destruction_0(int, int) in libconcert.a(iloexpression.o)

          __static_initialization_and_destruction_0(int, int) in libconcert.a(iloenv.o)

          __static_initialization_and_destruction_0(int, int) in libconcert.a(iloextractable.o)

          __static_initialization_and_destruction_0(int, int) in libconcert.a(iloallocator.o)

          __static_initialization_and_destruction_0(int, int) in libilocplex.a(ilocplex.o)

          __static_initialization_and_destruction_0(int, int) in libconcert.a(iloalg.o)

          __static_initialization_and_destruction_0(int, int) in libconcert.a(ilotypes.o)

          ...

      "std::ios_base::Init::~Init()", referenced from:

          ___tcf_0 in libconcert.a(iloexpression.o)

          ___tcf_0 in libconcert.a(iloenv.o)

          ___tcf_0 in libconcert.a(iloextractable.o)

          ___tcf_0 in libconcert.a(iloallocator.o)

          ___tcf_0 in libilocplex.a(ilocplex.o)

          ___tcf_0 in libconcert.a(iloalg.o)

          ___tcf_0 in libconcert.a(ilotypes.o)

          ...

      "std::ios_base::ios_base()", referenced from:

          IloNullStream::IloNullStream(std::basic_streambuf<char, std::char_traits<char> >&) in libconcert.a(iloenv.o)

      "std::ios_base::~ios_base()", referenced from:

          IloNullStream::IloNullStream(std::basic_streambuf<char, std::char_traits<char> >&) in libconcert.a(iloenv.o)

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloNullStream::~IloNullStream() in libconcert.a(iloenv.o)

          IloNullStream::~IloNullStream() in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          ...

      "std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)", referenced from:

          IloNullStream::IloNullStream(std::basic_streambuf<char, std::char_traits<char> >&) in libconcert.a(iloenv.o)

          IloNullStream::IloNullStream(std::basic_streambuf<char, std::char_traits<char> >&) in libconcert.a(iloenv.o)

      "std::cerr", referenced from:

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloCplexI::inconsistency(int) in libilocplex.a(ilocplex.o)

          IloAlgorithmI::IloAlgorithmI(IloEnvI*) in libconcert.a(iloalg.o)

      "std::cout", referenced from:

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloAlgorithmI::IloAlgorithmI(IloEnvI*) in libconcert.a(iloalg.o)

          IloAnyEqCstI::display(std::ostream&) const in libconcert.a(iloanyexpr.o)

          IloRandomStateI::display(std::ostream&) const in libconcert.a(ilorandom.o)

      "std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)", referenced from:

          IloIntVarDomainI::display(std::ostream&) in libconcert.a(iloexpression.o)

          IloSemiContVarI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloConversionI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloIntArrayElementI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          std::ostream& operator<<<double>(std::ostream&, IloArray<double> const&) in libconcert.a(iloexpression.o)

          std::ostream& operator<<<IloExtractable>(std::ostream&, IloArray<IloExtractable> const&) in libconcert.a(iloexpression.o)

          IloEnvI::printTime() const in libconcert.a(iloenv.o)

          ...

      "std::basic_ostream<char, std::char_traits<char> >& std::flush<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)", referenced from:

          _IloCplexWarningChannelFunction in libilocplex.a(ilocplex.o)

          _IloCplexLogChannelFunction in libilocplex.a(ilocplex.o)

      "std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:

          IloSymbolI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloComprehensionI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloConstConstraintI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloMonotonicNumExprI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloBoolVarDomainI::display(std::ostream&) in libconcert.a(iloexpression.o)

          IloSinI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          IloCosI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          ...

      "std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char)", referenced from:

          IloIntVarDomainI::display(std::ostream&) in libconcert.a(iloexpression.o)

          IloIntArrayElementI::display(std::ostream&) const in libconcert.a(iloexpression.o)

          std::ostream& operator<<<double>(std::ostream&, IloArray<double> const&) in libconcert.a(iloexpression.o)

          std::ostream& operator<<<IloExtractable>(std::ostream&, IloArray<IloExtractable> const&) in libconcert.a(iloexpression.o)

          IloMultiCriterionExprI::display(std::ostream&) in libconcert.a(iloextractable.o)

          IloSOS1I::display(std::ostream&) const in libconcert.a(iloextractable.o)

          IloSOS2I::display(std::ostream&) const in libconcert.a(iloextractable.o)

          ...

      "typeinfo for std::ostream", referenced from:

          construction vtable for std::ostream-in-IloNullStream in libconcert.a(iloenv.o)

          typeinfo for IloNullStream in libconcert.a(iloenv.o)

      "typeinfo for std::basic_streambuf<char, std::char_traits<char> >", referenced from:

          typeinfo for IloPrivateBuf in libconcert.a(iloenv.o)

      "VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >", referenced from:

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

      "vtable for std::basic_streambuf<char, std::char_traits<char> >", referenced from:

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          vtable for IloNamedPropertySet::NotPresent in libconcert.a(iloenv.o)

          IloPrivateBuf::~IloPrivateBuf() in libconcert.a(iloenv.o)

          IloPrivateBuf::~IloPrivateBuf() in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          ...

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >", referenced from:

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >", referenced from:

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          IloIndexOutOfBoundsException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloDataCollection::ImmutableException::getMessage() const in libconcert.a(ilocollectionstruct.o)

          IloOperatorException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getOperatorName() const in libconcert.a(ilocollectionstruct.o)

          IloFirstLastElementNotFoundException::getMessage() const in libconcert.a(ilocollectionstruct.o)

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "vtable for std::basic_ios<char, std::char_traits<char> >", referenced from:

          IloNullStream::IloNullStream(std::basic_streambuf<char, std::char_traits<char> >&) in libconcert.a(iloenv.o)

          IloEnvI::IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloEnvI::~IloEnvI() in libconcert.a(iloenv.o)

          IloNullStream::~IloNullStream() in libconcert.a(iloenv.o)

          IloNullStream::~IloNullStream() in libconcert.a(iloenv.o)

          IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.o)

          ...

      NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

      "non-virtual thunk to std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()", referenced from:

          construction vtable for std::ostream-in-IloNullStream in libconcert.a(iloenv.o)

      "non-virtual thunk to std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()", referenced from:

          construction vtable for std::ostream-in-IloNullStream in libconcert.a(iloenv.o)

    ld: symbol(s) not found for architecture x86_64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    make: *** [blend] Error 1

     

     

    Best regards,

    Andrea


    #CPLEXOptimizers
    #DecisionOptimization


  • 14.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Thu November 07, 2013 02:55 PM

    You may have run into the issue discussed here. Does it help to add -stdlib=libstdc++ to the compiler and linker flags?


    #CPLEXOptimizers
    #DecisionOptimization


  • 15.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Thu November 07, 2013 03:35 PM

    Originally posted by: andari20


    Yes!!!!.. finally it works!!... 

    Thank you so much Daniel!!!!!!!

    Best regards,

    Andrea


    #CPLEXOptimizers
    #DecisionOptimization


  • 16.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Mon March 23, 2015 05:39 PM

    Originally posted by: JohnnyLee234


    Hi I have a similar issue. I " make blend" in terminal and the output is as follows:

    clang++ -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -stdlib=libstdc++ -I../../../include -I../../../../concert/include  ../../../examples/src/cpp/blend.cpp -o blend.o

    clang++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -stdlib=libstdc++ -I../../../include -I../../../../concert/include  -L../../../lib/x86-64_osx/static_pic -L../../../../concert/lib/x86-64_osx/static_pic -o blend blend.o -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libstdc++

     

    Then I added "-lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libstdc++" to linker flags and "-O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -stdlib=libstdc+" to c/c++ flags, however it still doesn't work. 

    I am using Xcode 6 and the latest Cplex optimization studio. I feel confused. Thank you!


    #CPLEXOptimizers
    #DecisionOptimization


  • 17.  Re: How to configure Netbeans (C++) with Cplex 12.5 in Mac OS x?

    Posted Tue March 24, 2015 06:17 AM

    Same question asked (and answered) here.


    #CPLEXOptimizers
    #DecisionOptimization