Topic
6 replies Latest Post - ‏2014-04-07T15:31:43Z by GopalEaswaran
YongjiaSong
YongjiaSong
11 Posts
ACCEPTED ANSWER

Pinned topic Compiling error for C++ makefile on Mac OS 10.9 Mavericks

‏2013-10-27T17:07:45Z |

Hi all,

I run into a cplex cpp compiling error after updating my OS to Mac OS 10.9 Mavericks. Similar problems also happen to python, but c files works fine. Does anyone have a clue what happened? I am using CPLEX 12.5.1. Thanks!

Best,

  • DanielJunglas
    DanielJunglas
    1471 Posts
    ACCEPTED ANSWER

    Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

    ‏2013-10-27T20:00:52Z  in response to YongjiaSong

    What compiler and which version do you use? In case you do not use g++ yet, could you please try if things work better with g++? Could you please also show us the error messages you get?

    • YongjiaSong
      YongjiaSong
      11 Posts
      ACCEPTED ANSWER

      Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

      ‏2013-10-27T22:36:19Z  in response to DanielJunglas

      Thanks.

       

      Here is my g++ version:

      Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

      Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

      Target: x86_64-apple-darwin13.0.0

      Thread model: posix

       

       

      Here is the error message I got when using the Makefile provided by CPLEX. I am trying to compile CPLEX examples in .cpp:

       

      make all_c

      make[1]: Nothing to be done for `all_c'.

      make all_cpp

      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

      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

        "std::string::c_str() const", referenced from:

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

        "std::string::length() const", referenced from:

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

        "std::basic_ostringstream<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_ios<char, std::char_traits<char> >::widen(char) const", referenced from:

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

            IloCplexI::isSelfConsistent() in libilocplex.a(ilocplex.o)

            IloCplexI::isConsistent(IloCplexI*) in libilocplex.a(ilocplex.o)

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumEqIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumGeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumLeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            ...

        "std::ostream::put(char)", referenced from:

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

            IloCplexI::isSelfConsistent() in libilocplex.a(ilocplex.o)

            IloCplexI::isConsistent(IloCplexI*) in libilocplex.a(ilocplex.o)

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumEqIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumGeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumLeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            ...

        "std::ostream::flush()", referenced from:

            _IloCplexWarningChannelFunction in libilocplex.a(ilocplex.o)

            _IloCplexLogChannelFunction in libilocplex.a(ilocplex.o)

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

            IloCplexI::isSelfConsistent() in libilocplex.a(ilocplex.o)

            IloCplexI::isConsistent(IloCplexI*) in libilocplex.a(ilocplex.o)

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumEqIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            ...

        "std::ostream& std::ostream::_M_insert<void const*>(void const*)", referenced from:

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumEqIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumGeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumLeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloPWLconI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloMinConI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloMaxConI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            ...

        "std::ostream& std::ostream::_M_insert<double>(double)", referenced from:

            IloBoundI::display(std::ostream&) const in libilocplex.a(ilocplex.o)

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloMinConI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloMaxConI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

        "std::ostream& std::ostream::_M_insert<long>(long)", referenced from:

            IloRangeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumEqIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumGeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNumLeIndicatorI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloNoExtractI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloPWLconI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            IloMinConI::display(std::ostream&) const in libilocplex.a(ilologicextr.o)

            ...

        "std::basic_ostream<char, std::char_traits<char> >::basic_ostream(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::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::basic_ostream<char, std::char_traits<char> >::~basic_ostream()", referenced from:

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

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

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

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

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

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

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

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

            IloExtractableI::display(std::ostream&) const in libconcert.a(iloextractable.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::CannotRemoveException::print(std::ostream&) const in libconcert.a(iloalg.o)

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

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

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

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

            ...

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

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

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

            IloNumLinTermI::displayTerm(std::ostream&, IloNumLinExprTermI*) const in libconcert.a(iloexpression.o)

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

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

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

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

            ...

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

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

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

            IloCplexI::isSelfConsistent() in libilocplex.a(ilocplex.o)

            IloCplexI::isConsistent(IloCplexI*) in libilocplex.a(ilocplex.o)

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

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

            IloSemiContVarI::display(std::ostream&) const 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)

            ...

        "std::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)", referenced from:

            std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) in libconcert.a(iloenv.o)

        "std::string::_S_copy_chars(char*, char*, char*)", referenced from:

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

        "std::string::_Rep::_M_refdata()", referenced from:

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

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

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

        "std::string::_Rep::_M_set_length_and_sharable(unsigned long)", referenced from:

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

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

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

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

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

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() in libconcert.a(evaluator.o)

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() 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_streambuf<char, std::char_traits<char> >::basic_streambuf()", referenced from:

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

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

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

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() in libconcert.a(evaluator.o)

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() in libconcert.a(ilocollectionstruct.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)

            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)

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

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

            IloModelEvaluator::Unbound::getMessage() const in libconcert.a(evaluator.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)

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

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

            ___cxx_global_var_init in libconcert.a(iloexpression.o)

            ___cxx_global_var_init in libconcert.a(iloenv.o)

            ___cxx_global_var_init in libconcert.a(iloextractable.o)

            ___cxx_global_var_init in libconcert.a(iloallocator.o)

            __GLOBAL__I_a in libilocplex.a(ilocplex.o)

            ___cxx_global_var_init in libconcert.a(iloalg.o)

            ___cxx_global_var_init in libconcert.a(ilotypes.o)

            ...

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

            ___cxx_global_var_init in libconcert.a(iloexpression.o)

            ___cxx_global_var_init in libconcert.a(iloenv.o)

            ___cxx_global_var_init in libconcert.a(iloextractable.o)

            ___cxx_global_var_init in libconcert.a(iloallocator.o)

            __GLOBAL__I_a in libilocplex.a(ilocplex.o)

            ___cxx_global_var_init in libconcert.a(iloalg.o)

            ___cxx_global_var_init in libconcert.a(ilotypes.o)

            ...

        "std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)", referenced from:

            _IloCplexWarningChannelFunction in libilocplex.a(ilocplex.o)

            _IloCplexLogChannelFunction in libilocplex.a(ilocplex.o)

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

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

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

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

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

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

            IloBoundI::display(std::ostream&) const in libilocplex.a(ilocplex.o)

            _IloCplexWarningChannelFunction in libilocplex.a(ilocplex.o)

            _IloCplexLogChannelFunction in libilocplex.a(ilocplex.o)

            operator<<(std::ostream&, IloCplex::Algorithm) in libilocplex.a(ilocplex.o)

            operator<<(std::ostream&, IloCplex::BasisStatus) in libilocplex.a(ilocplex.o)

            operator<<(std::ostream&, IloCplex::BranchDirection) in libilocplex.a(ilocplex.o)

            operator<<(std::ostream&, IloCplex::CplexStatus) in libilocplex.a(ilocplex.o)

            ...

        "std::__throw_logic_error(char const*)", referenced from:

            char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloenv.o)

        "std::cerr", referenced from:

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

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

            IloCplexI::isSelfConsistent() in libilocplex.a(ilocplex.o)

            IloCplexI::isConsistent(IloCplexI*) 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:

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

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

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

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

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

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

            IloExtractableI::display(std::ostream&) const in libconcert.a(iloextractable.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)

            IloGeneratorI::displayFilters(std::ostream&) const in libconcert.a(iloexpression.o)

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

            IloNumExpr::NonLinearExpression::print(std::ostream&) const in libconcert.a(iloexpression.o)

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

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

            IloNumExprArrayElementI::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:

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

            std::ostream& operator<<<long>(std::ostream&, IloArray<long> 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(iloextractable.o)

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

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

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

            ...

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

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

            construction vtable for std::ostream-in-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)

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

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() in libconcert.a(evaluator.o)

            std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf() in libconcert.a(ilocollectionstruct.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)

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

            _main in blend.o

      ld: symbol(s) not found for architecture x86_64

      • Laci Ladanyi
        Laci Ladanyi
        80 Posts
        ACCEPTED ANSWER

        Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

        ‏2013-10-29T13:28:30Z  in response to YongjiaSong

        The issue is that with the maverick release Apple has switched from libstdc++ to libc++ as the default C++ library (both are present, just the default is changed). On OSX the earliest release CPLEX supports is 10.7, thus CPLEX uses the default for that platform (indeed, we had no way of knowing that Apple will change the default). So all you need to do is to edit the Makefile and add "-stdlib=libstdc++" to both CCOPT and CCLNFLAGS.

        • YongjiaSong
          YongjiaSong
          11 Posts
          ACCEPTED ANSWER

          Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

          ‏2013-10-29T14:17:18Z  in response to Laci Ladanyi

          Got it. Thanks a lot Laci!

          • UM2E_Ciriaco_D
            UM2E_Ciriaco_D
            1 Post
            ACCEPTED ANSWER

            Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

            ‏2014-01-30T16:07:27Z  in response to YongjiaSong
            Can you post the exact command line that you have used to compile your codes? 
            I have the same problem. I'm trying to compile through the command line shell 
            without a Makefile.
             
            (for example my command line for the linker is >> g++ -m64 -O3 -Wl,-no_compact_unwind 
            -fPIC -fexceptions -DNDEBUG -DIL_STD nodo_heap.o Heap.o source.o -o executable -L 
            ../IBM/ILOG/CPLEX_Studio125/cplex/lib/x86-64_darwin/static_pic/ -lilocplex -lcplex 
            -L../IBM/ILOG/CPLEX_Studio125/concert/lib/x86-64_darwin/static_pic/ 
            -lconcert -m64 -lm -pthread -framework CoreFoundation -framework IOKit ).
             
            Where do I have to put the code "-stdlib=libstdc++"??? 
            With or without the quotation marks?
            • DanielJunglas
              DanielJunglas
              1471 Posts
              ACCEPTED ANSWER

              Re: Compiling error for C++ makefile on Mac OS 10.9 Mavericks

              ‏2014-01-31T05:06:53Z  in response to UM2E_Ciriaco_D

              It should not matter where exactly you put the -stdlib=libstdc++. You need to specifiy this without the quotes. Please note that you not only need this for the linker but also for the compilation step.

              I suggest that you edit the Makefiles shipped with CPLEX as suggested by Laci. Then build the blend executable:

              cd cplex/examples/x86-64_osx/static_pic/
              make blend

              This will print out the commands used to compile and link the files. From there you can easily pick up the required flags as well as their order.

              • This reply was deleted by GopalEaswaran 2014-04-07T15:37:24Z. Reason for deletion: posted as a question on a separate thread