mac clion 下 stdio.h file not found

当使用Clion编辑器时,遇到stdio.h找不到的问题,原因是编辑器未能找到正确的系统C标准库路径。解决方案是创建软链接,将/Library/Developer/CommandLineTools/MacOSX.sdk指向实际存在的MacOSX11.1.sdk。通过执行`cd /Library/Developer/CommandLineTools/`然后`sudo ln -s MacOSX.sdk MacOSX11.1.sdk`的命令,可以修复此问题,使得程序能够正常运行。
部署运行你感兴趣的模型镜像

执行文件时提示

stdio.h file not found

clion 编辑器不会自带标准库,会找系统的c标准库
安装后,clion默认找的是/Library/Developer/CommandLineTools/MacOSX11.1.sdk目录,这个目录在系统中时不存在的,同目录下把MacOSX.sdkMacOSX11.1.sdk做个软链接

cd /Library/Developer/CommandLineTools/
sudo ln -s MacOSX.sdk MacOSX11.1.sdk

执行后运行正常

您可能感兴趣的与本文相关的镜像

Qwen-Image

Qwen-Image

图片生成
Qwen

Qwen-Image是阿里云通义千问团队于2025年8月发布的亿参数图像生成基础模型,其最大亮点是强大的复杂文本渲染和精确图像编辑能力,能够生成包含多行、段落级中英文文本的高保真图像

====================[ 构建 | test1 | Debug-Default ]============================== /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake --build /Users/zhangxin/Desktop/test1/cmake-build-debug-default --target test1 -- -j 6 [ 50%] Building CXX object CMakeFiles/test1.dir/main.cpp.o In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:90, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:67, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/cwchar:49, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/bits/postypes.h:42, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/iosfwd:44, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/ios:42, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/bits/ostream.h:43, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/ostream:42, from /opt/homebrew/Cellar/gcc/15.1.0/include/c++/15/iostream:43, from /Users/zhangxin/Desktop/test1/main.cpp:1: /opt/homebrew/Cellar/gcc/15.1.0/lib/gcc/current/gcc/aarch64-apple-darwin23/15/include-fixed/stdio.h:83:8: error: 'FILE' does not name a type 83 | extern FILE *__stdinp; | ^~~~ /opt/homebrew/Cellar/gcc/15.1.0/lib/gcc/current/gcc/aarch64-apple-darwin23/15/include-fixed/stdio.h:81:1: note: 'FILE' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 80 | #include <sys/_types/_seek_set.h> +++ |+#include <cstdio> 81 | /opt/homebrew/Cellar/gcc/15.1.0/lib/gcc/current/gcc/aarch64-apple-darwin23/15/include-fixed/stdio.h:84:8: error: 'FILE' does not name a type 84 | extern FILE *__stdoutp;
06-20
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值