为 iOS 模拟器构建,但链接到为 MacOSX 文件构建的 dylib

hol*_*scn 5 sdk xcode command-line-tool

这是一个奇怪的问题。我的 XCode 版本是 6.3.2。安装命令行工具后,我无法再编译了。任何需要与 dylib 链接的编译都会导致如下错误:

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
Run Code Online (Sandbox Code Playgroud)

当我使用 pip 安装 uwsgi 并手动编译 mongrel2 时会发生这种情况。

我已经导出SDKROOT/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdkxcrun --show-sdk-path正在显示。gcc --version显示:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
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
Run Code Online (Sandbox Code Playgroud)

我知道,海湾合作委员会是链接铛,我已经尝试添加选项-mmacosx-version-min=10.9CFLAGS,但没有固定的。

我想将 SDK 更改为 MacOSX,而​​不是 iOS 模拟器,我该怎么做?或者我能做些什么来解决这个问题。