Topic
  • 7 replies
  • Latest Post - ‏2018-11-13T03:19:52Z by sophiejuin
sophiejuin
sophiejuin
16 Posts

Pinned topic CPLEX XCODE

‏2018-11-07T02:54:03Z | cplex xcode

Hello,

 

I'm trying to use Xcode (version 10.1) for cplex (version 12.6) in mac high sierra but having some problems to build my program.

I have read the two threads:

 

https://www.ibm.com/developerworks/community/forums/html/topic?id=0a752651-d0eb-4e06-b160-36789934de35&ps=100&tags=&query=&filter=&sortBy=&order=asc

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014799744&ps=100&tags=&query=&filter=&sortBy=&order=asc

I did :

1. In Build Phases, import IOKit.framework, CoreFoudation.framework, libconcert.a, libilocplex.a, libcplexdistmip.a, and libcplex.a.

2. In Build Settings, the Header Search Paths, include.../IBM/ILOG/CPLEX_Studio1262/cplex/include, and .../IBM/ILOG/CPLEX_Studio1262/concert/include;

the Library Search Paths, I set .../IBM/ILOG/CPLEX_Studio1262/cplex/lib/x86-64_osx/static_pic, and .../CPLEX_Studio1262/concert/lib/x86-64_osx/static_pic.

3.Other C and C++ Flags some flags I found by running makefile in command line:  

 

.

 4. other linker flags, I added some flags I found by running makefile in command line:

I always get the errors as below. It seems that some people had the same problems, but i just can't make it work using the suggested methods in earlier threads. I really appreciate if anyone can help! Thank you!

 

Ld /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug/test2 normal x86_64 (in target: test2)

    cd /Users/junzheng/Documents/OR/CP/code/test2

    export MACOSX_DEPLOYMENT_TARGET=10.13

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug -L/Users/junzheng/Documents/OR/CP/code/test2/../../../../../Applications/IBM/ILOG/CPLEX_Studio1262/concert/lib/x86-64_osx/static_pic -L/Users/junzheng/Documents/OR/CP/code/test2/../../../../../Applications/IBM/ILOG/CPLEX_Studio1262/cplex/lib/x86-64_osx/static_pic -F/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug -filelist /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/test2.LinkFileList -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/test2_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libc++ -lcplexdistmip -lilocplex -lcplex -lconcert -framework IOKit -framework CoreFoundation -Xlinker -dependency_info -Xlinker /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/test2_dependency_info.dat -o /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug/test2

 

Undefined symbols for architecture x86_64:

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

      _main in main.o

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

      _main in main.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)

      IloSchedException::getMessage() const in libconcert.a(iloserror.o)

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

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

      IloSchedException::getMessage() const in libconcert.a(iloserror.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)

      IloSchedException::getMessage() const in libconcert.a(iloserror.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::ostream& std::ostream::_M_insert<long long>(long long)", referenced from:

      operator<<(std::ostream&, IloCplex::MIPCallbackI::NodeId) in libilocplex.a(ilocplex.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)

      operator<<(std::ostream&, IloLocationI const&) 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)

  "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::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

      IloSchedException::getMessage() const in libconcert.a(iloserror.o)

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

      IloSchedException::getMessage() const in libconcert.a(iloserror.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)

      IloSchedException::getMessage() const in libconcert.a(iloserror.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)

      char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) in libconcert.a(iloserror.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)

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

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

  "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)

  "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 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)

 

 

Updated on 2018-11-07T02:54:42Z at 2018-11-07T02:54:42Z by sophiejuin
  • DanielJunglas
    DanielJunglas
    3500 Posts
    ACCEPTED ANSWER

    Re: CPLEX XCODE

    ‏2018-11-12T08:20:55Z  

    Could someone help me out? I'm really stuck here. CryingThanks a lot!

    One of the main issues probably is that you are using a pretty old version of CPLEX with a rather recent version of MacOS. Is it an option to switch to a more recent version of CPLEX? For example 12.8?

    In any case, the first you have to make sure is that your compiler and linker command lines used by XCode look the same as the one printed when doing 'make blend'. Maybe it is a good idea to start a new project that with the source code of blend.cpp and try to get that going?

    Finally, I found this thread. It explains part of your issues and seems to indicate that maybe what you are trying to do is not (easily) possible with XCode and CPLEX 12.6 (because XCode has dropped support for some old things). If you cannot switch to a more recent version of CPLEX then I suggest you ask your question on an XCode forum. CPLEX should be no different than any other third party library that still required libstdc++ (instead of libc++). Note that more recent versions of CPLEX are build with libc++ as expected by XCode.

  • DanielJunglas
    DanielJunglas
    3500 Posts

    Re: CPLEX XCODE

    ‏2018-11-07T09:34:34Z  

    Do things work any better if you do *not* put -stdlib=libc++?

    Also, can you go to your CPLEX installation directory cplex/examples/x86-64_osx/static_pic, run 'make blend' there and show the output here?

  • sophiejuin
    sophiejuin
    16 Posts

    Re: CPLEX XCODE

    ‏2018-11-07T13:55:58Z  

    I deleted -stdlib=libc++ and got the same error as above.

    I ran 'make blend' and the output is the following:

    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++

    clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]

    ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.

    ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.

    Do you have any idea what I might do wrong?

    Thanks a lot!

    Updated on 2018-11-07T13:56:14Z at 2018-11-07T13:56:14Z by sophiejuin
  • DanielJunglas
    DanielJunglas
    3500 Posts

    Re: CPLEX XCODE

    ‏2018-11-07T14:33:59Z  

    I deleted -stdlib=libc++ and got the same error as above.

    I ran 'make blend' and the output is the following:

    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++

    clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]

    ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.

    ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/IOKit are out of sync. Falling back to library file for linking.

    Do you have any idea what I might do wrong?

    Thanks a lot!

    Can you please try -stdlib=libstdc++ instead of -stdlib=libc++ (note the additional 'std' in libstdc++!)?

     

  • sophiejuin
    sophiejuin
    16 Posts

    Re: CPLEX XCODE

    ‏2018-11-08T00:19:51Z  

    Can you please try -stdlib=libstdc++ instead of -stdlib=libc++ (note the additional 'std' in libstdc++!)?

     

    I tried and got this:

     

    CompileC /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.o /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: test2)

        cd /Users/junzheng/Documents/OR/CP/code/test2

        export LANG=en_US.US-ASCII

        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fmodules -gmodules -fmodules-cache-path=/Users/junzheng/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/junzheng/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.13 -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Index/DataStore -iquote /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-generated-files.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-own-target-headers.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-all-target-headers.hmap -iquote /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-project-headers.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug/include -I/Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include -I/Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/DerivedSources/x86_64 -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/DerivedSources -F/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -stdlib=libstdc++ -MMD -MT dependencies -MF /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.dia -c /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp -o /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.o

     

    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

    In file included from /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp:33:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include/ilcplex/ilocplex.h:27:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/ilomodel.h:21:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/iloalg.h:21:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/iloenv.h:21:

    /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/ilosys.h:355:10: fatal error: 'string' file not found

    #include <string>

             ^~~~~~~~

    1 warning and 1 error generated.

  • sophiejuin
    sophiejuin
    16 Posts

    Re: CPLEX XCODE

    ‏2018-11-11T01:06:00Z  

    I tried and got this:

     

    CompileC /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.o /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: test2)

        cd /Users/junzheng/Documents/OR/CP/code/test2

        export LANG=en_US.US-ASCII

        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fmodules -gmodules -fmodules-cache-path=/Users/junzheng/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/junzheng/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.13 -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Index/DataStore -iquote /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-generated-files.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-own-target-headers.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-all-target-headers.hmap -iquote /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/test2-project-headers.hmap -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug/include -I/Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include -I/Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/DerivedSources/x86_64 -I/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/DerivedSources -F/Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Products/Debug -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -stdlib=libstdc++ -MMD -MT dependencies -MF /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.dia -c /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp -o /Users/junzheng/Library/Developer/Xcode/DerivedData/test2-dhpftphadweeraetnoomqkwfwbwm/Build/Intermediates.noindex/test2.build/Debug/test2.build/Objects-normal/x86_64/main.o

     

    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

    In file included from /Users/junzheng/Documents/OR/CP/code/test2/test2/main.cpp:33:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include/ilcplex/ilocplex.h:27:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/ilomodel.h:21:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/iloalg.h:21:

    In file included from /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/iloenv.h:21:

    /Users/junzheng/Applications/IBM/ILOG/CPLEX_Studio1262/concert/include/ilconcert/ilosys.h:355:10: fatal error: 'string' file not found

    #include <string>

             ^~~~~~~~

    1 warning and 1 error generated.

    Could someone help me out? I'm really stuck here. CryingThanks a lot!

  • DanielJunglas
    DanielJunglas
    3500 Posts

    Re: CPLEX XCODE

    ‏2018-11-12T08:20:55Z  

    Could someone help me out? I'm really stuck here. CryingThanks a lot!

    One of the main issues probably is that you are using a pretty old version of CPLEX with a rather recent version of MacOS. Is it an option to switch to a more recent version of CPLEX? For example 12.8?

    In any case, the first you have to make sure is that your compiler and linker command lines used by XCode look the same as the one printed when doing 'make blend'. Maybe it is a good idea to start a new project that with the source code of blend.cpp and try to get that going?

    Finally, I found this thread. It explains part of your issues and seems to indicate that maybe what you are trying to do is not (easily) possible with XCode and CPLEX 12.6 (because XCode has dropped support for some old things). If you cannot switch to a more recent version of CPLEX then I suggest you ask your question on an XCode forum. CPLEX should be no different than any other third party library that still required libstdc++ (instead of libc++). Note that more recent versions of CPLEX are build with libc++ as expected by XCode.

  • sophiejuin
    sophiejuin
    16 Posts

    Re: CPLEX XCODE

    ‏2018-11-13T03:19:52Z  

    One of the main issues probably is that you are using a pretty old version of CPLEX with a rather recent version of MacOS. Is it an option to switch to a more recent version of CPLEX? For example 12.8?

    In any case, the first you have to make sure is that your compiler and linker command lines used by XCode look the same as the one printed when doing 'make blend'. Maybe it is a good idea to start a new project that with the source code of blend.cpp and try to get that going?

    Finally, I found this thread. It explains part of your issues and seems to indicate that maybe what you are trying to do is not (easily) possible with XCode and CPLEX 12.6 (because XCode has dropped support for some old things). If you cannot switch to a more recent version of CPLEX then I suggest you ask your question on an XCode forum. CPLEX should be no different than any other third party library that still required libstdc++ (instead of libc++). Note that more recent versions of CPLEX are build with libc++ as expected by XCode.

    Hi Daniel,

    I tried Cplex 12.8 and it is working now!

    Thank you so much for your detailed explanation. You really helped me!