I can't create a C++ project on my OS X

I want to create an project in c++ on My Mac OS X (1,6 GHz Intel Core i5/Intel HD Graphics 6000 1536 MB) but i always get this warning message:
An error occurred while trying to generate project files.

Running Mono…

Setting up Mono
/Users/Shared/UnrealEngine/4.12/Engine /Users/Shared/UnrealEngine/4.12/Engine/Binaries/Mac
Discovering modules, targets and source code for project…
Compiling with non-standard Xcode (xcode-select): /Library/Developer/CommandLineTools/
Triggered an exception while looking for SDK directory in Xcode.app
System.IO.DirectoryNotFoundException: Directory ‘/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs’ not found.
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in :0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in :0
at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in :0
at System.IO.Directory.GetDirectories (System.String path) [0x00000] in :0
at UnrealBuildTool.AppleToolChain.SelectSDK (System.String BaseSDKDir, System.String OSPrefix, System.String& PlatformSDKVersion, Boolean bVerbose) [0x00000] in :0
ERROR: Invalid SDK MacOSX.sdk, not found in /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs

What is the problem? I have Visual Studio Code installed with the c/c++ plugin and it also installed some packages called “mono”.
Please Help!

Do you have XCode instalied? It looks like it can’t find the sdk directory for it.

Thanks, just noticed myself. Didn’t realize that Apple runs different.

Im having the same issue, its only been since I upgraded to sierra and Xcode8 so I think its an apple thing not UE4

Probably you had another version of “cli-xcode”. For example, if you try some developer stuff like homebrew or just “xcode-select --install” ,which installs little bit different SDK (more regular for compile command line apps).

Anyway try to install official Xcode first and run this command in terminal after:
$sudo xcode-select -r

Let me know if it helps

Can confirm that the sudo xcode-select -r was what fixed it for me.

yeah thank you very much it works with sudo xcode-select --reset

ThankU, It work for me

That U, It work for me too.