Clion无法解析c ++ 11 std类型 [英] Clion can't resolve c++11 std types

查看:557
本文介绍了Clion无法解析c ++ 11 std类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如这些图片所示,我在ubuntu上的Clion无法解析std标识符例如std :: shared_ptr 。我们可以从中确认一个事实,因为clion可以找到包含文件。这个项目实际上可以编译,证明我的CMakeLists.txt很好。

As these picture show, my Clion on ubuntu can't resolved std identifier, eg std::shared_ptr. And we can confirm a fact from this as clion can find the include file. This project is actually able to compile, which prove my CMakeLists.txt is fine.

所以我的问题是,如何解决clion智能完成器?我应该在哪里修改哪些设置?

So my question is, how to fix this bug of clion smart-completor? Where and which settings should I modify?


  • clion无法解析std

  • clion尝试从libstdc ++ bits / shared_ptr.h

--------------第二次编辑---------------

-------------- second edit ---------------

在CMakeLists.txt中删除CMAKE_CXX_DEBUG_FLAGS后,此未解决的问题得以解决。我认为这可能是由于CMAKE_CXX_DEBUG_FLAGS和CMAKE_CXX_FLAGS中的重复标志引起的。
谢谢大家。

After delete CMAKE_CXX_DEBUG_FLAGS in CMakeLists.txt, this unresolved problem is solved. I think it might be caused by duplicated flags in both CMAKE_CXX_DEBUG_FLAGS and CMAKE_CXX_FLAGS. Thanks everyone.

推荐答案

我没有 CMAKE_CXX_DEBUG_FLAGS 标记,我尝试了 File> Invalidate Caches / Restart ,它成功了!

i didn't have CMAKE_CXX_DEBUG_FLAGS flag and i tried File>Invalidate Caches / Restart and it worked!

听起来像CLion的错误

sounds like CLion's bug

这篇关于Clion无法解析c ++ 11 std类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆