Page 1 of 1

Compiling C++ examples under Mac with Xcode

Posted: Wed Aug 01, 2018 2:06 am
by a6a3uh
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.

Re: Compiling C++ examples under Mac with Xcode

Posted: Mon Aug 06, 2018 1:40 pm
by chrisdembia
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.