This is a strange problem. My version of Xcode is 6.3.2. After I installed the command line tools, I could no longer compile. Any compilation that should contact dylib will throw an error, for example:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libm.dylib' for architecture x86_64
This happens when I use pip to install uwsgi and compile mongrel2 manually.
I have already exported SDKROOTto /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdkand xcrun --show-sdk-pathshows this. gcc --versionshows:
Configured with:
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
I know that gcc is a link to clang, and I tried to add an option -mmacosx-version-min=10.9to CFLAGS, but nothing was fixed.
I want to change the SDK on MacOSX, not iOS Simulator, how can I do this? Or what can I do to fix it.
source
share