clion标头文件不知道是标题单元吗?
我刚刚安装了Clion,并试图在C ++中编写一个简短的程序。但是,当我尝试导入> import< iostream>
或import gtector< vector>
i得到
Header file <iostream> (aka '/Library/Developer/CommandLineTools/usr/include/c++/v1/iostream') cannot be imported because it is not known to be a header unit
该项目在C ++ 20中,我在我的cmakelists.txt中,我做过> set(cmake_cxx_standard 20)
我尝试按照说明在此处尝试 MacOS更新为Catalina之后找不到Clion C ++标头文件,但它并没有解决我的问题
I just installed Clion and am trying to write a short program in C++. However, when I try to import <iostream>
or import <vector>
I get
Header file <iostream> (aka '/Library/Developer/CommandLineTools/usr/include/c++/v1/iostream') cannot be imported because it is not known to be a header unit
The project is in C++ 20, in my CMakeLists.txt I did set(CMAKE_CXX_STANDARD 20)
I tried following the instructions here CLion C++ header files not found after macOS is updated to Catalina but it didn't resolve my issue
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您的意思是
#include&lt; iostream&gt;
。标题单元(带有
导入
)是C ++ 20中的新事物,并且尚未完全由工具支持。I guess you meant
#include <iostream>
.Header units (with
import
) are the new thing in C++20 and they are not yet fully supported by tools.