Qt-creator 错误: C1083: 无法打开包含文件: 'xxx.h': 没有这样的文件或目录

Qt-creator error: C1083: Cannot open include file: 'xxx.h': No such file or directory

本文关键字:文件 xxx 包含 C1083 错误 Qt-creator      更新时间:2023-10-16

我在Windows OS上使用QT-CREATOR和VS C 编译器创建QT项目,

.pro文件:

HEADERS = 
    mainwindow.h 
    myqglwidget.h 
    My_CGAL_Config.h 
    My_Vertex_base.h 
    My_Halfedge_base.h 
    My_Face_base.h 
    my_polyhedron.h
SOURCES = 
    Viewer.cpp 
    mainwindow.cpp 
    myqglwidget.cpp 
    my_polyhedron.cpp
INCLUDEPATH += .
INCLUDEPATH += C:/dev/CGAL-4.9/auxiliary/gmp/include
INCLUDEPATH += C:/dev/CGAL-4.9/include
INCLUDEPATH += C:/local/boost_1_59_0
INCLUDEPATH += C:/dev/libQGLViewer-2.7.1/QGLViewer
LIBS += -LC:/dev/CGAL-4.9/lib
LIBS += -LC:/local/boost_1_59_0/lib
LIBS += -LC:/dev/libQGLViewer-2.7.1/QGLViewer -lQGLViewer2

错误:

'qglviewer.h','config.h'在指定文件夹中(c:/dev/libqglviewer-2.7.7.1/qglviewer,c: dev dev cgal-4.9 cgal(,分别为因此,我认为警告消息中的问题"构建目录必须与源目录处于同一级别。"

编译输出消息:

Error while building/deploying project dr_mine (kit: Desktop Qt 5.7.1 MSVC2013 64bit)
The kit Desktop Qt 5.7.1 MSVC2013 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"

我感谢任何帮助,谢谢

警告'构建目录需要与源目录相同的级别,这意味着您的构建目录应在源附近找到:

c:rootDirsrc
c:rootDirbuild

我想您的QT安装未正确安装。首先,我应该看看:

https://forum.qt.io/topic/56437/how-to-to-fix-error-while-while-building-deploying-project/6

或Google

构建/部署项目时错误

找到类似的帖子。