带有cmake的Qtcreator:代码模型无法解析包含的文件

时间:2019-06-04 06:32:43

标签: c++ cmake clang qt-creator

我在qt Creator中使用了自定义设置,在clang代码模型中给了我警告。警告状态:

  

警告::例如,代码模型无法解析包含的文件,这可能导致错误的代码完成和突出显示。

     

compiler_gnu.h:60:3:错误:未定义字节序

     
    

header.hpp:1:1:注意:在C:\ project \ src \ UDP \ header.hpp:1包含的文件中:     header.hpp:11:10:注意:在C:\ project \ src \ UDP \ header.hpp:11包含的文件中:     datatypes.hpp:4:10:注意:在C:\ project \ src \ datatypes.hpp:4包含的文件中:     cstdint:145:10:注意:在C:\ qnx700 \ target \ qnx7 \ usr \ include \ c ++ \ v1 \ cstdint:145包含的文件中:     stdint.h:63:16:注意:在C:\ Qt \ Tools \ QtCreator \ bin \ clang \ lib \ clang \ 7.0.0 \ include \ stdint.h:63包含的文件中:     stdint.h:23:10:注意:在C:\ qnx700 \ target \ qnx7 \ usr \ include \ stdint.h:23包含的文件中:     platform.h:74:42:注意:在C:\ qnx700 \ target \ qnx7 \ usr \ include \ sys \ platform.h:74:

包含的文件中   

我检查了master,发现settings.pycompiler_gnu.h的定义未定义。编译进行得很好,所以我想C ++代码模型找不到在编译期间在编译器中设置的DEFINES。

在editor_gnu.h中:

__LITTLEENDIAN__

我正在使用cmake在Qt Creator 4.9.1中打开我的项目,因此我无权访问.pro文件来定义其他宏。

问题:如何确保clang代码模型可以找到来自qcc编译器的定义?

如果需要,我可以在套件中添加所有设置设置,但是为了简单起见,我暂时将它们省略。

0 个答案:

没有答案
相关问题