2017-10-04 102 views
1

路我已经尝试添加包含路径.pro文件的底部:不能包含在Windows

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> 

我也试图改变为相对路径,使用普通的斜杠和双反斜线。这样

+0

我用这之前尝试一下:'INCLUDEPATH + = $$ PWD /../../项目/ qmenu' – aghilpro

+2

尝试INCLUDEPATH + =“C: \\ Users \\ Alexandre \\ Desktop \\ meshlab-2016.12 \\ vcglib-1.0.1“或INCLUDEPATH + =”/c/Users/Alexandre/Desktop/meshlab-2016.12/vcglib-1.0.1“ –

回答

0

不知道你的项目目录,但如果你的目录是这样

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.

+0

@Alexandre Severino如果我的回答对您有帮助,请接受答案或加入,谢谢。 – aghilpro