我已经尝试将包含路径添加到.pro文件的底部:
INCLUDEPATH += "C:\Users\Alexandre\Desktop\meshlab-2016.12\vcglib-1.0.1"然后我运行了qmake。
但我仍然有错误:
C:\Users\Alexandre\Desktop\meshlab-2016.12\src\common\filterparameter.cpp:28: error: C1083: Cannot open include file: 'vcg/math/matrix44.h': No such file or directory和其他许多类似的东西。
代码如下所示:
#include <vcg/math/matrix44.h>我还尝试将路径更改为相对路径,使用正常斜杠和双反斜杠。
发布于 2017-10-05 00:17:46
不确定您的项目目录,但您的目录是否如下所示
projectFolder/vcg/math/matrix44.h您可以像这样添加头文件路径:
INCLUDEPATH += $$PWD/vcg/math然后包含不带路径的头文件:
#include <matrix44.h>还要使用$PWD来引用当前的项目目录。
有关PWD的更多信息:
The PWD variable specifies the full path leading to the directory containing the current file being parsed. This can be useful to refer to files within the source tree when writing project files to support shadow builds.
https://stackoverflow.com/questions/46569221
复制相似问题