2017-10-04 104 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