Compiling C++ examples under Mac with Xcode

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Ali Tlisov
Posts: 3
Joined: Tue Apr 10, 2018 10:18 pm

Compiling C++ examples under Mac with Xcode

Post by Ali Tlisov » Wed Aug 01, 2018 2:06 am

Tried to go through developer's guide but stuck at the very beginning with first example ExampleMain compiled with following error:

Code: Select all

Ld build/Debug/exampleMain normal x86_64
    cd /Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain
    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.13.sdk -L/Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/Debug -F/Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/Debug -filelist /Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/OpenSimTugOfWar.build/Debug/exampleMain.build/Objects-normal/x86_64/exampleMain.LinkFileList -Xlinker -rpath -Xlinker /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib -Xlinker -rpath -Xlinker /Applications/OpenSim\ b435c8f-2018-07-06/sdk/Simbody/lib -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/OpenSimTugOfWar.build/Debug/exampleMain.build/Objects-normal/x86_64/exampleMain_lto.o -Xlinker -no_deduplicate -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimTools.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimAnalyses.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimActuators.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimSimulation.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimCommon.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/Simbody/lib/libSimTKsimbody.3.7.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/Simbody/lib/libSimTKmath.3.7.dylib /Applications/OpenSim\ b435c8f-2018-07-06/sdk/Simbody/lib/libSimTKcommon.3.7.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Accelerate.framework -ldl -lm /Applications/OpenSim\ b435c8f-2018-07-06/sdk/lib/libosimLepton.dylib -Xlinker -dependency_info -Xlinker /Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/OpenSimTugOfWar.build/Debug/exampleMain.build/Objects-normal/x86_64/exampleMain_dependency_info.dat -o /Users/ali/Documents/OpenSim/4.0.Beta/Code/CPP/ExampleMain/build/Debug/exampleMain

clang: error: no such file or directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Accelerate.framework'
I'm running macOS High Sierra 10.13.6.

Tags:

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Compiling C++ examples under Mac with Xcode

Post by Christopher Dembia » Mon Aug 06, 2018 1:40 pm

I think the issue is that you built Simbody, then upgraded Xcode, then tried building OpenSim.

I ran into your same issue recently and fixed it by rebuilding Simbody from scratch.

POST REPLY