Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Xcode c++ and Cplex

  • 1.  Xcode c++ and Cplex

    Posted Tue March 13, 2012 04:00 AM

    Originally posted by: SystemAdmin


    Hello
    I have a problem calling cplex from Xcode while coding in c++. I set the path of all the header files and libraries but I still got an error like below

    ilosys.h
    Lexical or pre-processor issue
    strstream.h file not found

    Could you please help me with this? thank you.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Xcode c++ and Cplex

    Posted Tue March 13, 2012 04:06 AM

    Originally posted by: SystemAdmin


    Does the problem persist if you define the IL_STD preprocessor macro (add -DIL_STD to the compiler command line)?
    If you face problems like this I suggest you compile one of the examples that is shipped with CPLEX and compare the command line used to compile the example and the command line generated by Xcode. In order to compile an example on Windows look at file c_cpp.html. On non-Windows go to cplex/examples/PORT/SYSLIB (replace PORT and SYSLIB appropriately) and type 'make blend'. This will build the blend example. make will display the commands it executes and you will see what flags are required to build an object file and what flags are required for linking.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Xcode c++ and Cplex

    Posted Tue March 13, 2012 02:08 PM

    Originally posted by: SystemAdmin


    This is the Terminal output when I execute "make blend"
    blend.cpp:33:30: error: ilcplex/ilocplex.h: No such file or directory
    blend.cpp:35: error: ‘ILOSTLBEGIN’ does not name a type
    blend.cpp:38: error: ‘IloNum’ does not name a type
    blend.cpp:39: error: ‘IloNumArray’ does not name a type
    blend.cpp:41: error: ‘IloNumArray2’ does not name a type
    blend.cpp:44: error: variable or field ‘define_data’ declared void
    blend.cpp:44: error: ‘IloEnv’ was not declared in this scope
    blend.cpp: In function ‘int main(int, char**)’:
    blend.cpp:73: error: ‘IloEnv’ was not declared in this scope
    blend.cpp:73: error: expected `;' before ‘env’
    blend.cpp:75: error: ‘IloInt’ was not declared in this scope
    blend.cpp:75: error: expected `;' before ‘j’
    blend.cpp:77: error: ‘env’ was not declared in this scope
    blend.cpp:77: error: ‘define_data’ was not declared in this scope
    blend.cpp:79: error: ‘IloModel’ was not declared in this scope
    blend.cpp:79: error: expected `;' before ‘model’
    blend.cpp:81: error: ‘IloNumVarArray’ was not declared in this scope
    blend.cpp:81: error: expected `;' before ‘m’
    blend.cpp:82: error: expected `;' before ‘r’
    blend.cpp:83: error: expected `;' before ‘s’
    blend.cpp:84: error: expected `;' before ‘i’
    blend.cpp:85: error: expected `;' before ‘e’
    blend.cpp:88: error: ‘model’ was not declared in this scope
    blend.cpp:88: error: ‘nm’ was not declared in this scope
    blend.cpp:88: error: ‘m’ was not declared in this scope
    blend.cpp:88: error: ‘IloScalProd’ was not declared in this scope
    blend.cpp:88: error: ‘nr’ was not declared in this scope
    blend.cpp:88: error: ‘r’ was not declared in this scope
    blend.cpp:89: error: ‘ns’ was not declared in this scope
    blend.cpp:89: error: ‘s’ was not declared in this scope
    blend.cpp:89: error: ‘ni’ was not declared in this scope
    blend.cpp:89: error: ‘i’ was not declared in this scope
    blend.cpp:89: error: ‘IloMinimize’ was not declared in this scope
    blend.cpp:92: error: ‘j’ was not declared in this scope
    blend.cpp:92: error: ‘nbElements’ was not declared in this scope
    blend.cpp:93: error: ‘e’ was not declared in this scope
    blend.cpp:93: error: ‘p’ was not declared in this scope
    blend.cpp:93: error: ‘alloy’ was not declared in this scope
    blend.cpp:93: error: ‘P’ was not declared in this scope
    blend.cpp:93: error: ‘IloNumVar’ was not declared in this scope
    blend.cpp:97: error: ‘e’ was not declared in this scope
    blend.cpp:97: error: ‘IloSum’ was not declared in this scope
    blend.cpp:97: error: ‘alloy’ was not declared in this scope
    blend.cpp:100: error: ‘nbElements’ was not declared in this scope
    blend.cpp:101: error: ‘PRaw’ was not declared in this scope
    blend.cpp:102: error: ‘PScrap’ was not declared in this scope
    blend.cpp:103: error: ‘PIngot’ was not declared in this scope
    blend.cpp:107: error: ‘IloCplex’ was not declared in this scope
    blend.cpp:107: error: expected `;' before ‘cplex’
    blend.cpp:108: error: ‘cplex’ was not declared in this scope
    blend.cpp:112: error: ‘IloAlgorithm’ has not been declared
    blend.cpp:113: error: ‘endl’ was not declared in this scope
    blend.cpp:116: error: ‘endl’ was not declared in this scope
    blend.cpp:118: error: ‘nbElements’ was not declared in this scope
    blend.cpp:121: error: ‘nbRaw’ was not declared in this scope
    blend.cpp:124: error: ‘nbScrap’ was not declared in this scope
    blend.cpp:127: error: ‘nbIngot’ was not declared in this scope
    blend.cpp:130: error: ‘nbElements’ was not declared in this scope
    blend.cpp:133: error: expected type-specifier before ‘IloException’
    blend.cpp:133: error: expected `)' before ‘&’ token
    blend.cpp:133: error: expected `{' before ‘&’ token
    blend.cpp:133: error: ‘ex’ was not declared in this scope
    blend.cpp:133: error: expected `;' before ‘)’ token
    blend.cpp:136: error: expected primary-expression before ‘catch’
    blend.cpp:136: error: expected `;' before ‘catch’
    blend.cpp:139: error: ‘env’ was not declared in this scope
    make: *** blend Error 1
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Xcode c++ and Cplex

    Posted Tue March 13, 2012 05:16 PM

    Originally posted by: SystemAdmin


    That is weird. In which directory did you run the command?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Xcode c++ and Cplex

    Posted Tue March 13, 2012 09:12 PM

    Originally posted by: SystemAdmin


    The following directory :
    /Users/myname/ilogg/cplex/examples/src/cpp
    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: Xcode c++ and Cplex

    Posted Wed March 14, 2012 07:14 AM

    Originally posted by: SystemAdmin


    That is the wrong directory. Try a directory like this
    
    /Users/myname/ilogg/cplex/examples/x86-64_darwin9_gcc4.0/static_pic
    

    or whatever is suitable for your installation. The last two components of the directory path should identify you operating system.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 7.  Re: Xcode c++ and Cplex

    Posted Wed March 14, 2012 11:13 AM

    Originally posted by: SystemAdmin


    Okay, now this is the terminal output :
    g++ -O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I../../../include -I../../../../concert/include ../../../examples/src/cpp/blend.cpp -o blend.o
    /var/folders/yv/bxgnjb2n58q_nnry92bmp5qw0000gn/T//cchmeyxo.s:unknown:FATAL:can't create output file: blend.o
    make: *** http://blend.o Error 1
    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: Xcode c++ and Cplex

    Posted Wed March 14, 2012 02:01 PM

    Originally posted by: SystemAdmin


    It seems like you don't have the required privileges to create files in that directory. But at least you can see what flags are required to compile an object file. You can pick up these flags and add them to Xcode so that Xcode uses the same command line as is shown in your post.
    To work around the problem with the permissions you could try the following to compile the example in a different directory (you may need to adjust path names if you use a different port):
    
    cd $HOME mkdir dummy cd dummy make \ -f /Users/myname/ilogg/cplex/x86-64_darwin9_gcc4.0/static_pic/Makefile \ CPLEXDIR=/Users/myname/ilogg/cplex \ CONCERTDIR=/Users/myname/ilogg/concert \ blend
    

    #DecisionOptimization
    #MathematicalProgramming-General


  • 9.  Re: Xcode c++ and Cplex

    Posted Wed March 14, 2012 06:03 PM

    Originally posted by: SystemAdmin


    Okay, I execute the same command with the privilege in that folder and this is the output :

    sh-3.2# make blend
    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 blend.o -o blend -L../../../lib/x86-64_darwin9_gcc4.0/static_pic -lilocplex -lcplex -L../../../../concert/lib/x86-64_darwin9_gcc4.0/static_pic -lconcert -m64 -lm -lpthread -framework CoreFoundation -framework IOKit
    ld: warning: could not create compact unwind for _CPXopenCPLEX: register 6 saved somewhere other that in frame
    ld: warning: could not create compact unwind for __088dae7420c74d842071d15e3f197d91: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __6136bca1908713e9dea4f11cddc4c2e5: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __510b9a0657652ea845ef8c03c93df958: register 6 saved somewhere other that in frame
    ld: warning: could not create compact unwind for __e49e69a32c6e7b40dbe2a6f2f778ce7b: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_014: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_api_011: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_api_001: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_000: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_029: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_096: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_019: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_027: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_083: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_121: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_107: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_021: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_004: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_020: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_010: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_067: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilm_fun_122: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _ilmget_licbits: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _CPXopenCPLEXruntime: register 6 saved somewhere other that in frame
    ld: warning: could not create compact unwind for __a6b3416c590ae52dbfb4f778f3cd88fd: register 3 saved somewhere other that in frame
    ld: warning: could not create compact unwind for _CPXEclocksync: register 3 saved somewhere other that in frame
    ld: warning: could not create compact unwind for _CPXparenv: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __3485f93c793862b073696691c3c39d07: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __fc6e07ecec1f1457f53392fd52e76db6: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __bdce6da0dfb86dd7ebc9fcaae40a1335: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __c5715c1b630130e47e663f778223423f: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __f0eb099ef922ef9d6ff90eb3b326671b: register 12 saved somewhere other that in frame
    ld: warning: could not create compact unwind for _CPXfreeparenv: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _CPXcloseCPLEX: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _CPXgetchannels: register 3 saved somewhere other that in frame
    ld: warning: could not create compact unwind for _CPXflushstdchannels: register 12 saved somewhere other that in frame
    ld: warning: could not create compact unwind for __00d8837700d22af4f11660485f5be6c2: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __d58bfa43d0e9da2172320f14e1279821: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for __91251efc567bcb548c93fbccbb38cec3: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _CPXversion: register saved more than once (might be shrink wrap)
    ld: warning: could not create compact unwind for _CPXlicbits: register saved more than once (might be shrink wrap)
    #DecisionOptimization
    #MathematicalProgramming-General


  • 10.  Re: Xcode c++ and Cplex

    Posted Thu March 15, 2012 01:45 AM

    Originally posted by: SystemAdmin


    OK, this shows you all the flags that are required to properly compile and link applications that use CPLEX. So you can now add these flags to your configuration in Xcode.

    I am not a MAC expert so I am not sure whether the warnings emitted by the linker are a problem. Does the generated 'blend' binary work as expected? If you just run 'make execute_cpp' in this directory, does it successfully execute all C++ examples?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 11.  Re: Xcode c++ and Cplex

    Posted Thu March 15, 2012 02:53 AM

    Originally posted by: SystemAdmin


    It generates the same warnings but I think it is Okay now, thank you for your help !
    #DecisionOptimization
    #MathematicalProgramming-General


  • 12.  Re: Xcode c++ and Cplex

    Posted Thu March 15, 2012 03:02 AM

    Originally posted by: SystemAdmin


    See here for some comments about the warnings.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 13.  Re: Xcode c++ and Cplex

    Posted Tue July 24, 2012 10:52 AM

    Originally posted by: YMSD_Alysson_Costa


    Dear all,

    I have a similar problem and followed the steps mentioned. I have a main file "main.cpp" that depends on other files such as "io.h" and "io.cpp". I can compile everything via command line with:
    g++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/cplex/include -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/concert/include -c main.cpp

    g++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/cplex/include -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/concert/include -c io.cpp

    g++ -O0 -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/cplex/include -I/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/concert/include -o alwabp main.o io.o cplexSolve.o stringUtil.o -L/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/cplex/lib/x86-64_darwin9_gcc4.0/static_pic -lilocplex -lcplex -L/Users/alysson/Applications/IBM/ILOG/CPLEX_Studio_Academic124/concert/lib/x86-64_darwin9_gcc4.0/static_pic -lconcert -m64 -lm -lpthread -framework CoreFoundation -framework IOKit
    But I don't know where to put the appropriate compile information in xcode.

    I really apologize for the stupidity of the question...

    Alysson
    #DecisionOptimization
    #MathematicalProgramming-General


  • 14.  Re: Xcode c++ and Cplex

    Posted Wed July 25, 2012 02:39 AM

    Originally posted by: SystemAdmin


    I never used xcode but googling for 'xcode compiler options' and 'xcode linker options' finds plenty of instructions about how to set these options.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 15.  Re: Xcode c++ and Cplex

    Posted Mon March 23, 2015 04:35 PM

    Originally posted by: JohnnyLee234


    Hi, I followed the above steps and following is the terminal output. But I don't know for sure which flags  are for building the file and which ones are for linking.

    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 iloqcpdual iloqcpdual.o -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libstdc++

     

    Thank you! 

     

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 16.  Re: Xcode c++ and Cplex

    Posted Mon March 23, 2015 04:58 PM

    Originally posted by: JohnnyLee234


    I added "-O0 -c -m64 -O -fPIC -fexceptions -DNDEBUG -DIL_STD" to "C/C++ flags" and "-lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit" to "other linker flags". But it still doesn't work. It displays: "Apple Mach-O Linker(Id) Error". 


    #DecisionOptimization
    #MathematicalProgramming-General


  • 17.  Re: Xcode c++ and Cplex

    Posted Tue March 24, 2015 06:20 AM

    Can you please provide the full error message, or even better, the full build log?

    Also, where did you specify the directories that are the arguments of the -L arguments? Note that you may have to specify them with their absolute path, depending on where exactly Xcode is running your build.

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 18.  Re: Xcode c++ and Cplex

    Posted Tue March 24, 2015 07:29 PM

    Originally posted by: JohnnyLee234


    I tried with "blend.cpp", the message is as follows. Thank you!!!

    Ld /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug/Cplextest normal x86_64

        cd /Users/chengzhangli/Desktop/Cplextest

        export MACOSX_DEPLOYMENT_TARGET=10.9

        /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.10.sdk -L/Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug -L/Users/chengzhangli/Applications/IBM/ILOG/CPLEX_Studio_Preview1261/concert/lib/x86-64_osx/static_pic -L/Users/chengzhangli/Applications/IBM/ILOG/CPLEX_Studio_Preview1261/cplex/lib/x86-64_osx/static_pic -F/Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug -filelist /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Intermediates/Cplextest.build/Debug/Cplextest.build/Objects-normal/x86_64/Cplextest.LinkFileList -mmacosx-version-min=10.9 -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libstdc++ -stdlib=libc++ -lcplex -lilocplex -lconcert -framework IOKit -framework CoreFoundation -Xlinker -dependency_info -Xlinker /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Intermediates/Cplextest.build/Debug/Cplextest.build/Objects-normal/x86_64/Cplextest_dependency_info.dat -o /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug/Cplextest

     

    Undefined symbols for architecture x86_64:

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

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

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

          ...

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

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

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

          ...

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

          _main in main.o

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

          ...

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

          _main in main.o

          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:

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

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

          IloPWLconI::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)

          IloAlgorithmI::printTime() const in libconcert.a(iloalg.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::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:

          __GLOBAL__I_a in main.o

          ___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(iloalg.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)

          ...

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

          __GLOBAL__I_a in main.o

          ___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(iloalg.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)

          ...

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

          _main in main.o

          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)

          ...

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

          _main in main.o

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

          IloAlgorithmI::IloAlgorithmI(IloEnvI*) in libconcert.a(iloalg.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::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)

          IloAlgorithmI::printTime() const in libconcert.a(iloalg.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)

    ld: symbol(s) not found for architecture x86_64

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

    Showing first 200 notices only

     

    Ld /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug/Cplextest normal x86_64

        cd /Users/chengzhangli/Desktop/Cplextest

        export MACOSX_DEPLOYMENT_TARGET=10.9

        /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.10.sdk -L/Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug -L/Users/chengzhangli/Applications/IBM/ILOG/CPLEX_Studio_Preview1261/concert/lib/x86-64_osx/static_pic -L/Users/chengzhangli/Applications/IBM/ILOG/CPLEX_Studio_Preview1261/cplex/lib/x86-64_osx/static_pic -F/Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug -filelist /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Intermediates/Cplextest.build/Debug/Cplextest.build/Objects-normal/x86_64/Cplextest.LinkFileList -mmacosx-version-min=10.9 -lconcert -lilocplex -lcplex -m64 -lm -lpthread -framework CoreFoundation -framework IOKit -stdlib=libstdc++ -stdlib=libc++ -lcplex -lilocplex -lconcert -framework IOKit -framework CoreFoundation -Xlinker -dependency_info -Xlinker /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Intermediates/Cplextest.build/Debug/Cplextest.build/Objects-normal/x86_64/Cplextest_dependency_info.dat -o /Users/chengzhangli/Library/Developer/Xcode/DerivedData/Cplextest-hapmzuemsimycrfkfmxbhqswpxhm/Build/Products/Debug/Cplextest

     

    Undefined symbols for architecture x86_64:

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

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

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

          ...

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

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

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

          ...

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

          _main in main.o

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

          ...

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

          _main in main.o

          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:

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

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

          IloPWLconI::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)

          IloAlgorithmI::printTime() const in libconcert.a(iloalg.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::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:

          __GLOBAL__I_a in main.o

          ___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(iloalg.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)

          ...

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

          __GLOBAL__I_a in main.o

          ___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(iloalg.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)

          ...

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

          _main in main.o

          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)

          ...

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

          _main in main.o

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

          IloAlgorithmI::IloAlgorithmI(IloEnvI*) in libconcert.a(iloalg.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::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)

          IloAlgorithmI::printTime() const in libconcert.a(iloalg.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)

    ld: symbol(s) not found for architecture x86_64

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

    Showing first 200 notices only

     

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 19.  Re: Xcode c++ and Cplex

    Posted Tue March 24, 2015 07:43 PM

    Originally posted by: JohnnyLee234


    For your second suggestion, I am sorry for that I didn't follow it well since both of Xcode and cplex are new to me. I will further provide the configuration for my C++ project so far.

    In build phases, for the link binary with libraries, I selected: 

    libcplex.a

    libilocplex.a

    libconcert.a

    IOKit.framework

    CoreFoundation.framework

     

    For the header search path, I specify two: 

    "$(SRCROOT)/../../Applications/IBM/ILOG/CPLEX_Studio_Preview1261/cplex/include" and "$(SRCROOT)/../../Applications/IBM/ILOG/CPLEX_Studio_Preview1261/concert/include".

    For library search path, I specify two:

    "$(USER_APPS_DIR)/IBM/ILOG/CPLEX_Studio_Preview1261/concert/lib/x86-64_osx/static_pic" and "$(USER_APPS_DIR)/IBM/ILOG/CPLEX_Studio_Preview1261/cplex/lib/x86-64_osx/static_pic".

     

    I am not sure whether I answered your questions. Please let me know if you need any other information. Thanks!!!

     

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 20.  Re: Xcode c++ and Cplex

    Posted Fri March 27, 2015 06:01 AM

    This could be a mismatch in clang versions. Does it help to set the deployment target to 10.7 (currently you are using deployment target 10.9). What is the version of clang you are using?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 21.  Re: Xcode c++ and Cplex

    Posted Fri March 27, 2015 09:24 AM

    Originally posted by: JohnnyLee234


    Hi Daniel, thank you for your reply!

    I was not unable to set the deployment target to 10.7 as it seems that the lowest version I have is 10.9. Please see the attached file. Can I set the deployment target by myself instead of choosing from the pop-up menu?

    The version of clang for now is 6.0. Please refer to the second attachment. 

    Thank you!!!


    #DecisionOptimization
    #MathematicalProgramming-General


  • 22.  Re: Xcode c++ and Cplex

    Posted Fri March 27, 2015 09:58 AM

    Originally posted by: JohnnyLee234


    Hi Daniel, I am sorry. I make a mistake. I actually can set the deployment target as 10.7. I did it and tried to build it again. However it displays the error message the same as before. Thank you very much!

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 23.  Re: Xcode c++ and Cplex

    Posted Fri April 17, 2015 03:32 AM

    What looks odd is that apparently you have this on your linker command line:

    -stdlib=libstdc++ -stdlib=libc++

    Can you try to remove '-stdlib=libc++'? If that still does not work, could you please again post

    • The full output of 'make blend' (potentially after removing 'blend.o' and 'blend')
    • The full command and output lines of compilation and link with Xcode

    ?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 24.  Re: Xcode c++ and Cplex

    Posted Fri December 02, 2016 07:34 PM

    Originally posted by: NHamoud


    I have the same issue here. Setting up CPLEX on Apple Xcode 6.2. I followed the instructions on this webpage (http://www.leandro-coelho.com/how-to-configure-ibm-cplex-with-apple-xcode/), and run the blend.cpp example. I got this error and warning, attached below:

     

     

    Any help would be appreciated!

    Nabeel


    #DecisionOptimization


  • 25.  Re: Xcode c++ and Cplex

    Posted Sun December 04, 2016 11:56 AM

    It is close to impossible to help you since all the error messages are truncated. They only show parts of the path to the problematic files. In order to help you we would need to

    - see the full error messages,

    - see the exact compiler command line you are using.

    Just a wild guess: Could it be that you don't have -DIL_STD on your compiler command line?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 26.  Re: Xcode c++ and Cplex

    Posted Sun December 04, 2016 01:25 PM

    Originally posted by: NHamoud


    Thanks Daniel for your response. Here's screenshots of the compiler and the errors:

     

    Thanks for your help.

     

    Nabeel


    #DecisionOptimization


  • 27.  Re: Xcode c++ and Cplex

    Posted Sun December 04, 2016 02:35 PM

    I am not an expert in Xcode, but is it enough to add -DIL_STD to "Other C flags" when you are compiling C++? Don't you need to add it to "Other C++ flags" as well?

    If IL_STD is defined, then none of the header files should attempt to pull in strstream.h. They should only try to pull in strstream (without .h). Can you try the following experiment:

    - As the very first line in main.cpp add this:

    #ifdef IL_STD
    #   error "IL_STD is correctly defined"
    #endif

    - compile

    - if compilation fails with the finger pointing at the code added above then you know for sure that IL_STD is defined. If compilation does not fail this way then something with your compiler flags is wrong.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 28.  Re: Xcode c++ and Cplex

    Posted Sun December 04, 2016 04:57 PM

    Originally posted by: NHamoud


    Thanks Daniel.

    Here's 3 scenarios:

    1- When -DIL_STD is added to "Other C++ flags" without changing anything else, I get 47 errors related to STD.

    2- If I added the code you provided without adding -DIL_STD to "Other C++ flags", I get the same warnings and errors as before (strstream.h).

    3- However, If I added -DIL_STD to "Other C++ flags" and added the code you provided and compiled,  I get "IL_STD is correctly defined".

     

    Any clue!

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 29.  Re: Xcode c++ and Cplex

    Posted Tue December 06, 2016 12:18 AM

    OK, from this experiment it is clear that you need to add -DIL_STD to "Other C++ flags". What are the errors that you get in scenario 1? As per the instructions earlier in the thread, you should also add -stdlib=libc++ to "Other C++ flags". Did you do this?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 30.  Re: Xcode c++ and Cplex

    Posted Tue December 06, 2016 01:20 AM

    Originally posted by: NHamoud


    Thanks Daniel for your follow up.

    With only  -DIL_STD in "Other C++ flags", I get these 47 errors:

     

    And after adding  -DIL_STD as well as -stdlib=libc++ to "Other C++ flags", I get the following error:


    #DecisionOptimization


  • 31.  Re: Xcode c++ and Cplex

    Posted Tue December 06, 2016 01:35 AM

    OK, now the compiler considers '-DIL_STD' as an input file rather than a compiler flag. That is very odd. I have no idea why that may be. Maybe you should check with some Xcode Forum what may be wrong here.

    I am grasping at straws here, but does it help to revert the order of -DIL_STD and -stdlib=libc++?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 32.  Re: Xcode c++ and Cplex

    Posted Tue December 06, 2016 01:44 AM

    Originally posted by: NHamoud


    No, the same error.

     

    I really appreciate your efforts Daniel. I'll check with the Xcode community and update here if it is solved. 

     

    BTW, are you aware of any software other than Xcode that works well with cplex for mac users?

     

    Thanks again!

    Nabeel


    #DecisionOptimization
    #MathematicalProgramming-General


  • 33.  Re: Xcode c++ and Cplex

    Posted Wed December 07, 2016 02:02 AM

    What should definitely work is to compile the application in the command line.

    If you change into directory cplex/examples/x86-64_osx/static_pic in your CPLEX installation and then type 'make blend' then this should build the blend.cpp example.

     

    One other thing I just thought of you could try: In your main.cpp file add this as the very first line (before including any header file):

    #define IL_STD

    Then remove -DIL_STD from the 'Other C++ flags'. Assuming you have only a single source file (main.cpp) this may do the trick.

    But I am still puzzled that the compiler interprets -DIL_STD as a file name. Could it be that during all these experiments you have put -DIL_STD someplace else where it should not be (although I don't see it in the verbose compiler command line). Maybe just try to start a new project from scratch, don't set 'Other C flags' and instead only set those two 'Other C++ flags'.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 34.  Re: Xcode c++ and Cplex

    Posted Thu December 15, 2016 01:39 PM

    Originally posted by: flisshou


    I'm trying to set up the environment for CPLEX 12.7 based on the settings I used to use for Community 12.6.3. However, I get an error message like the attached photo.

    1. In Build Phases, I imported IOKit.framework, CoreFoudation.framework, libconcert.a, libilocplex.a, libcplexdistmip.a, and libcplex.a. (See attached image)

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

    the Library Search Paths, I set .../IBM/ILOG/CPLEX_Studtio127/cplex/lib, and .../IBM/ILOG/CPLEX_Studio127/concert/lib.

    (If I change the Library Path to .../cplex/lib/x86-64_osx/static_pic and .../concert/lib/x86-64_osx/static_pic, it would run more other error messages.)

    3. I set Other C and C++ Flags by putting in -DIL_STD.

    4. And change C++ Standard Library to libstdc++.

     

    And I still can't figure out why this is happening.

    Is there anything else that I should set up? Or I messed up with the settings?!?!

     


    #DecisionOptimization


  • 35.  Re: Xcode c++ and Cplex

    Posted Wed January 04, 2017 04:49 AM

    Double check the linker search paths (-L argument) in your setup. You are missing x86-64_osx/static_pic in them. These are mandatory and omitting them results in the linker not being able to find anything for -lconcert. If you get other errors with these settings then there are other mistakes that need to be fixed as well. What are these other errors?


    #DecisionOptimization
    #MathematicalProgramming-General