-
-
Save wawiesel/eba461de5f5e38f7f0ac93ae3676b484 to your computer and use it in GitHub Desktop.
F=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks | |
for d in $(ls -d $F/*.framework); | |
do | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $(ls -d $F/ApplicationServices.framework/Versions/A/Frameworks/*.framework); | |
do | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $(ls -d $F/CoreServices.framework/Versions/A/Frameworks/*.framework); | |
do | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
Try to set this option to your compiler:
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
In CMake
:
target_compile_options(${PROJECT_NAME} PUBLIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
Also, check that /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
is actually a symlink to MacOSX10.14.sdk
.
It fixed the issue for me, together with an updated script to symlink Carbon and PrivateFrameworks too, see:
https://gist.github.com/karololszacki/dec8fd80b20e081b0e91a6bbd639c8fe
I come from stack overflow.
After I run your shell, it indeed fixes up, but a new error message comes out.
Below is the details of the error message:
In file included from main.m:1:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:87:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:14:
In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:29:
/Library/Frameworks/AE.framework/Headers/AppleEvents.h:597:165: error:
expected function body after function declarator
...AEEventID theAEEventID, Boolean askUserIfNeeded ) __OSX_AVAILA...
^
/usr/include/Availability.h:216:50: note: expanded from macro
'__OSX_AVAILABLE_STARTING'
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILIT...
^
:84:1: note: expanded from here
__AVAILABILITY_INTERNAL__MAC_10_14
^
1 error generated.Hope you can help me.thanks
Same issue here - I have similar errors after making the symlinks. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk is a symlink to MacOSX.sdk.
I come from stack overflow.
After I run your shell, it indeed fixes up, but a new error message comes out.
Below is the details of the error message:
In file included from main.m:1:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:87:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:14:
In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:29:
/Library/Frameworks/AE.framework/Headers/AppleEvents.h:597:165: error:
expected function body after function declarator
...AEEventID theAEEventID, Boolean askUserIfNeeded ) __OSX_AVAILA...
^
/usr/include/Availability.h:216:50: note: expanded from macro
'__OSX_AVAILABLE_STARTING'
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILIT...
^
:84:1: note: expanded from here
__AVAILABILITY_INTERNAL__MAC_10_14
^
1 error generated.
Hope you can help me.thanks