我在终端上使用了gcc命令来编译C程序但突然间,在我的Mac操作系统更新后(到macOS 10.14 Mojave和XCode 10.0),我开始收到消息:
test.c:8:10: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^~~~~~~~~
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
我已经安装了gcc,因为我可以找到它/usr/local/bin并且那里确实有一个gcc.我尝试在我的其他iMac上运行相同的文件,它没有任何问题.
我试过运行xcode-select --install它已经安装好了,因此它没有解决我现在遇到的问题.我猜测路径搞砸了,因为gcc在我开始复制并粘贴其他资源中的一些命令来解决此问题后,它似乎无法找到.
希望对此有所帮助.
我有一个OS X 10.8.2的macbook pro.XCode已安装.我知道它出现在Applications目录中.在/ usr/bin中还有xcodebuild和xcode-select文件我需要知道是否安装了命令行工具.有命令吗?我该怎么做才能看到是否安装了XCode CLT,如果是,则查找安装的版本?
当我尝试运行以前工作的git命令时,我得到了这个:
dyld: Symbol not found: _sqlite3_intarray_bind
Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
Expected in: /opt/local/lib/libsqlite3.dylib
in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?