PDA

View Full Version : qmake INCLUDEPATH with spaces



bitChanger
26th April 2006, 18:53
How do I include a path with a space in it:



INCLUDEPATH = c:\Program Files\blahblahblah


I tried quotes and that didn't work. :confused:

jacek
26th April 2006, 19:02
Double quotes should work:
INCLUDEPATH += "c:\Program Files\blahblahblah"if not, you can try:
INCLUDEPATH += c:\Progra~1\blahblahblah

bitChanger
26th April 2006, 19:12
Double quotes did not work.

Using progra~1 works.



INCLUDEPATH += c:\Progra~1\blahblahblah


However, it seems there should be a better way of doing this.
I'll use the ~1 for now. Thanks! :)

dimitri
26th April 2006, 20:02
I tried quotes and that didn't work. :confused:
How doesn't it work?

There are indeed issues with filenames with special characters.

With the Microsoft toolchain some of them cannot be fixed since they originate in Microsoft's nmake as far as I know.
With the MinGW toolchain, I believe this is a known issue that should be fixed in an upcoming release.

bitChanger
26th April 2006, 20:08
The following is what didn't work.



INCLUDEPATH += "c:\Program Files\blahblahblah"


qmake parses this as 2 paths separated by the space.

dimitri
26th April 2006, 21:29
I need to see the actual error messages - together with *.pro file if possible.

ankurjain
27th April 2006, 05:43
This must not happen as such, just try posting the error message. Also try escaping the space ( this is what happens in *nix environments, dunno if it works with windows as well ).

Which version are u using ?

bitChanger
27th April 2006, 13:11
There is no error message. qmake thinks its two completely separate paths and includes both of them. So I guess I get an error about cannot find header file during compile time. The issue is not an error, it's that qmake will not allow for an include path with a space in it. The space is qmake's line break character.

I do a lot of Matlab integration with Qt and the new Matlab uses an include path located in 'Program Files/Matlab/' this is why I'm including something from that path.

P.S. I tried the '\ ' escape on the space and it didn't work neither. Thanks though.

I'm using Qt 4.1.2 for this project.

ankurjain
28th April 2006, 05:39
Have u checked in the Project Settings in Visual Studio? i tried the path with spaces in it in pro file. I just enclosed the path in double qoutes, after that i imported the file in VC++.

There i checked the path, its full in double quotes :


/I"C:/Documents and Settings/ajain/Desktop/qt/include"

if i dont use "" then this happens


/I"C:\Documents" /I"and" /I"Settings\ajain\Desktop\qt\include"

See if this helps and reply .... ur qt installation is perfect na ? hav u tried running other examples ?