如何在Mac上为C设置库路径

时间:2019-10-28 13:36:00

标签: c terminal compiler-errors path include

每次我运行C程序时,都会给我以下错误消息:


/usr/local/lib/gcc/x86_64-apple-darwin18.5.0/8.3.0/include-fixed/stdio.h:78:10:fatal error: _stdio.h: No such file or directory
 #include <_stdio.h>
          ^~~~~~~~~~

我已经使用以下命令在堆栈溢出中查找它:

export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

然后它起作用了,但是!

每次我运行C程序时,我都必须使用上面的行,每次都必须更改路径,这非常烦人  如何实际设置正确的路径以正确的地址以解决此问题

0 个答案:

没有答案