Decision Optimization

Expand all | Collapse all

CPLEX on macbook M1

  • 1.  CPLEX on macbook M1

    Posted Thu August 19, 2021 09:49 AM
    Hello,

    I have a problem using CPLEX 201 concert technology C++ on macbook chip M1 with MacOS 11.2.3. Previously, I created a copy of the Terminal on Rosetta2, and I was able to run CPLEX through "makefile" for C++. However, it is now impossible for me to use that approach after updating some apps, I get the following error (If anyone can help me):

    make all_cpp

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

    ld: warning: ignoring file modelo.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64

    Undefined symbols for architecture x86_64:

      "_main", referenced from:

         implicit entry/start for main executable

    ld: symbol(s) not found for architecture x86_64

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

    make[1]: *** [modelo] Error 1

    make: *** [all] Error 2



    ------------------------------
    Omar Jorge Ibarra Rojas
    ------------------------------


  • 2.  RE: CPLEX on macbook M1

    Posted Thu August 19, 2021 09:57 AM
    With M1 chip, you need to tell the OS in which mode you want to launch a command:
    ``` arch -x86_64 make  ``` for currently support intel architecture.

    ------------------------------
    Vincent Beraudier
    ------------------------------



  • 3.  RE: CPLEX on macbook M1

    Posted Thu August 19, 2021 10:13 AM
    It works fine! thanks!

    ------------------------------
    Omar Jorge Ibarra Rojas
    ------------------------------