thewormsterror
thewormsterror

Reputation: 1618

Xcode 9 macos deployment target (with c++) giving error

When I try building a make project (from a c++ repository) I get the following error in XCode 9 : "MacBook Pro runs macOS 10.12.6, which is lower than program’s minimum deployment target. Change your project’s minimum deployment target or upgrade MacBook Pro’s version of macOS."

I tried setting MAC_OS_DEPLOYMENT_TARGET and MAC_OSX_DEPLOYMENT_TARGET to no avail.

I really would appreciate any help as I'm banging my head against the wall trying to figure this out. It worked in XCode 8 as far as I remember.

Upvotes: 1

Views: 1860

Answers (2)

riordant
riordant

Reputation: 98

Providing command Line arguments to the External Build Tool Configuration Arguments field did not work for me. (It's also worth noting that if you disable "Debug executable" while editing the target's scheme, it works - but I'm assuming that that is not something anyone wants). What eventually worked for me was just upgrading to High Sierra (10.13.4). It now builds in Release and Debug mode.

Upvotes: 0

valdyr
valdyr

Reputation: 198

Had the same exact issue when wanted to build open source C++ project which uses makefiles, hence used External Build System in Xcode 9.2.

Followed advice from QuinceyMorris (from here: https://forums.developer.apple.com/thread/96361)

If you want to run the EBS target, you have to find an external way of providing the command-line arguments you need. In my case I added additional arguments to External Build Tool Configuration Arguments field CFLAGS=-mmacosx-version-min=10.12 CXXFLAGS=-mmacosx-version-min=10.12. See screenshot attached.

Also check out this SO answer: C++, Mac OS X, Xcode 8 : Compile Boost : Set deployment target to OS X 10.11

enter image description here

Upvotes: 0

Related Questions