Results 1 to 9 of 9

Thread: qmake INCLUDEPATH with spaces

  1. #1
    Join Date
    Jan 2006
    Posts
    70
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default qmake INCLUDEPATH with spaces

    How do I include a path with a space in it:

    Qt Code:
    1. INCLUDEPATH = c:\Program Files\blahblahblah
    To copy to clipboard, switch view to plain text mode 

    I tried quotes and that didn't work.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake INCLUDEPATH with spaces

    Double quotes should work:
    INCLUDEPATH += "c:\Program Files\blahblahblah"
    if not, you can try:
    INCLUDEPATH += c:\Progra~1\blahblahblah

  3. The following user says thank you to jacek for this useful post:

    bitChanger (26th April 2006)

  4. #3
    Join Date
    Jan 2006
    Posts
    70
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake INCLUDEPATH with spaces

    Double quotes did not work.

    Using progra~1 works.

    Qt Code:
    1. INCLUDEPATH += c:\Progra~1\blahblahblah
    To copy to clipboard, switch view to plain text mode 

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

  5. #4
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake INCLUDEPATH with spaces

    Quote Originally Posted by bitChanger
    I tried quotes and that didn't work.
    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.

  6. #5
    Join Date
    Jan 2006
    Posts
    70
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake INCLUDEPATH with spaces

    The following is what didn't work.

    Qt Code:
    1. INCLUDEPATH += "c:\Program Files\blahblahblah"
    To copy to clipboard, switch view to plain text mode 

    qmake parses this as 2 paths separated by the space.

  7. #6
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake INCLUDEPATH with spaces

    I need to see the actual error messages - together with *.pro file if possible.

  8. #7
    Join Date
    Mar 2006
    Location
    Vadodara, Gujarat, India
    Posts
    65
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake INCLUDEPATH with spaces

    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 ?
    Do what u r afraid to do, and the death of fear is sure.

  9. #8
    Join Date
    Jan 2006
    Posts
    70
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake INCLUDEPATH with spaces

    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.

  10. #9
    Join Date
    Mar 2006
    Location
    Vadodara, Gujarat, India
    Posts
    65
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake INCLUDEPATH with spaces

    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 :

    Qt Code:
    1. /I"C:/Documents and Settings/ajain/Desktop/qt/include"
    To copy to clipboard, switch view to plain text mode 

    if i dont use "" then this happens

    Qt Code:
    1. /I"C:\Documents" /I"and" /I"Settings\ajain\Desktop\qt\include"
    To copy to clipboard, switch view to plain text mode 

    See if this helps and reply .... ur qt installation is perfect na ? hav u tried running other examples ?
    Do what u r afraid to do, and the death of fear is sure.

Similar Threads

  1. another qmake INCLUDEPATH spaces problem
    By mmueller in forum Qt Programming
    Replies: 4
    Last Post: 31st July 2008, 14:12
  2. qmake multiple INCLUDEPATH in Linux
    By rajeshs in forum Qt Programming
    Replies: 12
    Last Post: 15th November 2007, 10:38
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.