Additional Include Directories [I/PATH]



  • How can I tell Qt to include a specific folder to find header files, the same as Visual Studio does when using Additional Include Directories.

    TIA

    By the way, Qt does not work with VS2013 32/64 bit.
    I really don't understand why Qt keeps insisting that it does, worst yet, it provides a installer that ... no, ...no it does not work. It creates a bad deception, these installers should be removed.



  • Just check INCLUDEPATH directive in pro file


  • Moderators

    LIke dheerendra said use INCLUDEPATH += /my/dir.

    As for MSVC 2013, I have used Qt with that many times. One of my projects requires MSVC and I have built with the newest and older versions 2011. It works just fine.

    I've even done custom Qt builds with MSVC2013 and built subsequent projects with the custom built Qt libs.

    I ran into problems here and there but was able to solve all the custom build issues I ran into and ended up with a pretty easy to build Qt. I can share my configuration info and problems/solutions I ran into if you are running into custom build problems.



  • I am glad that you know how this toolkit works, and in all fairness you are not the only one saying that; there was another "dude":http://qt-project.org/mebmer/39728 claiming the same thing. However, when I reinstalled Qt and found the same problems as before, I directly address this problems to him, but guess what? like I am sure others will do again, he stopped answering my posts. It is easy to say, oh! but it worked for me in the past! why is it not working for you now?

    Dude! listen! No, it does not work! and anyone giving an opinion opposing mine should be willing to meet me half way, I will reinstall the toolkit and I will report AGAIN the same problems I encountered, so that s/he would again be proven wrong by me.

    Like I said, whatever you did in the past with qt and VSExpress is in the past. TODAY! Qt does not work with VSE2013. thus Qt must not seek refuge in the prestigious reputation of VC++ by implying that it will work under the might of VC++ and should immediately remove the following links:
    "Qt 5.3.1 for Windows 32-bit (VS 2010, OpenGL, 537 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2012, OpenGL, 553 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2013, 559 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2013, OpenGL, 557 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 64-bit (VS 2013, 573 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 64-bit (VS 2013, OpenGL, 571 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows RT 32-bit (647 MB) (Info)":http://qt-project.org/downloads

    As the saying goes, "talk is cheap" and I say: Put your money where your mouth is".

    Thanks again for your replay.


  • Lifetime Qt Champion

    The dude mentioned didn't received any direct message and you didn't answer his last question.


  • Moderators

    Ok, well if you post actual error messages or specifics on your problem I'm willing to try to help you figure it out.

    It's not always easy. Qt doesn't always build nicely on all systems/compiler combinations. I've always been able to get a working build though. I've had times where it took me upwards of a week to get it working but I get there in the end. It's best to stick to combinations that are recommended by Qt devs or that are known to work well.

    I haven't built 5.3.1 on 2013 yet, but I'm sure I could get it to build. I know it definitely works as the Qt devs have provided builds made on that compiler.

    That being said if you aren't stuck with MS technology for some reason, I find mingw to be a much better solution in general, not just for Qt. But I'm spoiled by gcc on OSX and Linux. Makes working in windows pure torture these days, lol.



  • OK.
    Here is my report:
    Installing qt-opensource-windows-x86-1.6.0-5-online.exe
    Setup Qt = C:\ToolKit\Qt
    Select Components:
    Qt 5.3

    • msvc2013 32-bit
    • msvc2013 64-bit

    Tools

    • Qt Creator 3.2.2

    Clicked Next
    Accept the licences
    Cliked Next
    Start menu shortcuts
    (default)Accessories\Qt
    Clicked Next
    Clicked Show Details

    Selected Component(s) without Dependencies
    qt
    qt.tools
    qt.readme
    qt.tools.maintenance
    Added as dependency for qt.53.
    qt.53.doc
    qt.53.examples
    Component(s) that have resolved Dependencies
    qt.53
    Added as dependency for qt.tools.qtcreator.
    qt.tools.vcredist
    Added as dependency for qt.53.win32_msvc2013.
    qt.tools.qtcreator
    Component(s) that have resolved Dependencies
    qt.53.win32_msvc2013
    Added as dependency for qt.53.win64_msvc2013_64.
    qt.tools.vcredist_64
    Component(s) that have resolved Dependencies
    qt.53.win64_msvc2013_64

    Clicked Install

    --- After installation - Open Existing project
    Settings: Configure Project

    • Desktop Qt 5.3 MSVC2013 64bit
      Clicked - Configure Project
      Ctrl-B
      Compile Output

    12:59:42: Running steps for project Murcielago...
    12:59:42: Configuration unchanged, skipping qmake step.
    12:59:42: Starting: "C:\ToolKit\Qt\Tools\QtCreator\bin\jom.exe"
    C:\ToolKit\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\Murcielago.pdb -DUNICODE -DWIN32 -I"......\Dev\c++\C++\jme" -I"." -I"C:\ToolKit\Qt\5.3\msvc2013_64\mkspecs\win32-msvc2013" -Fodebug\ @C:\Users\ARBOLO~1\AppData\Local\Temp\main.obj.25308.16.jom
    main.cpp
    ..\Murcielago\main.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such file or directory
    cl -c -nologo -Zm200 -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\Murcielago.pdb -DUNICODE -DWIN32 -I"......\Dev\c++\C++\jme" -I"." -I"C:\ToolKit\Qt\5.3\msvc2013_64\mkspecs\win32-msvc2013" -Fodebug\ @C:\Users\ARBOLO~1\AppData\Local\Temp\exception.obj.25308.16.jom
    exception.cpp
    d:\dev\c++\c++\jme\exception\exception.hpp(11) : fatal error C1083: Cannot open include file: 'string': No such file or directory
    jom: D:\Documents\QtProjects\build-Murcielago-Desktop_Qt_5_3_MSVC2013_64bit-Debug\Makefile.Debug [debug\main.obj] Error 2
    jom: D:\Documents\QtProjects\build-Murcielago-Desktop_Qt_5_3_MSVC2013_64bit-Debug\Makefile.Debug [debug\exception.obj] Error 2
    jom: D:\Documents\QtProjects\build-Murcielago-Desktop_Qt_5_3_MSVC2013_64bit-Debug\Makefile [debug] Error 2
    12:59:42: The process "C:\ToolKit\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project Murcielago (kit: Desktop Qt 5.3 MSVC2013 64bit)
    When executing step "Make"
    12:59:42: Elapsed time: 00:00.


  • Moderators

    Looks like it doesn't know where to find your winapi files. That is where things like string and iostream are located.

    Are you for sure using the desktop version of MSVC 2013 or are you using the managed code version? As far as I know Qt doesn't work with C# or the managed code version of VC 2013.



  • What does this look like to you:
    Settings: Configure Project – Desktop Qt 5.3 MSVC2013 64bit

    No, eh. Cannot help, right?. Just say it man, it is OK.
    You would not be the first one to throw the towel.

    In view that Qt does not work with Microsoft Visual Studio Express 2013, wouldn't you say that my statement above is right? Should Qt continue seeking shelter in Microsoft?

    [quote author="ArbolOne" date="1407879961"]I am glad that you know how this toolkit works, and in all fairness you are not the only one saying that; there was another "dude":http://qt-project.org/mebmer/39728 claiming the same thing. However, when I reinstalled Qt and found the same problems as before, I directly address this problems to him, but guess what? like I am sure others will do again, he stopped answering my posts. It is easy to say, oh! but it worked for me in the past! why is it not working for you now?

    Dude! listen! No, it does not work! and anyone giving an opinion opposing mine should be willing to meet me half way, I will reinstall the toolkit and I will report AGAIN the same problems I encountered, so that s/he would again be proven wrong by me.

    Like I said, whatever you did in the past with qt and VSExpress is in the past. TODAY! Qt does not work with VSE2013. thus Qt must not seek refuge in the prestigious reputation of VC++ by implying that it will work under the might of VC++ and should immediately remove the following links:
    "Qt 5.3.1 for Windows 32-bit (VS 2010, OpenGL, 537 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2012, OpenGL, 553 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2013, 559 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 32-bit (VS 2013, OpenGL, 557 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 64-bit (VS 2013, 573 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows 64-bit (VS 2013, OpenGL, 571 MB) (Info)":http://qt-project.org/downloads
    " Qt 5.3.1 for Windows RT 32-bit (647 MB) (Info)":http://qt-project.org/downloads

    As the saying goes, "talk is cheap" and I say: Put your money where your mouth is".

    Thanks again for your replay.[/quote]

    I don't mean to insult or belittle anyone, but it is people like SGaist, who keep insisting on the Qt/MS combo functionality and falsely encouraging new comers to that end, that are belittling Qt to a point of ridicule. The RAD is nice, the toolkit is satisfactory, but the BS is unbearable.


  • Moderators

    Well it works for me. I just built a project using MSVC 2013 express and Qt Creator to test it.

    It built just fine.

    You're problem is that Qt Creator isn't seeing your winapi directory. You can provide the proper directories to it or on a project basis using INCLUDEPATH += <your winapi include directory> in your pro file.

    My guess though is something is not configured properly. Since I don't use Qt Creator much (only in windows which I try to avoid) I can't help you on what exact setting you need. My guess would be in the Qt Kit setup area in the preferences.

    I'm sorry you have had problems with getting your Qt working. But I assure you it works just fine for me and other people.

    Since my time is quite valuable and you seem aggressive about this whole thing I'm done helping, but rest assured it works just fine if configured properly.

    Good luck!



  • OMG! this is only your 2nd reply and you are already saying it, you are saying "It is easy to say, oh! but it worked for me in the past! why is it not working for you now?"
    Look, I have already uninstalled that version of Qt, but just to satisfy my curiosity I will reinstalled that junk again.
    Man! You have no idea how hard I laughed when I read your first sentence.
    My advice to you is, don't be a RIGHT fighter, don't fight to be right, just because you have to be right. It is what it is, you tell me it works, but I am showing you proof that it does not.
    I'll come back tomorrow with the new result based on the patch you suggested.
    In the mean time, have a fantastic day and thank you for taking the time to read my post. I hope those kids at Qt Digia also appreciate your loyalty.



  • OK, I added this line
    INCLUDEPATH += C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include
    in the *.pro file.
    Please note that there are white spaces in the PATH, would this matter? if it does, how do I represent spaces?


  • Moderators

    I think you misunderstood. I just tested it. I loaded up my vm made sure I had the newest qt and built a project with msvc 2013. It wasn't an old test. I did it just for this thread. It wasn't some past test with an old version. I built the project tonight.

    On top of that the project I chose was one of the most complicated build environments. If that one worked I imagine just about anything would.

    You have your environment setup wrong. If you fix it things will build just fine.

    To quote strings use $$quote(path).



  • OK, this is what the *.pro looks like
    @
    TEMPLATE = app
    CONFIG += console
    CONFIG -= app_bundle
    CONFIG -= qt
    CONFIG += c++11
    INCLUDEPATH += $$quote(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include)
    SOURCES += main.cpp
    @

    and the code is a simple "hello world".
    What does Qt says:
    @
    10:03:06: Running steps for project Murcielago...
    10:03:06: Configuration unchanged, skipping qmake step.
    10:03:06: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
    C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\Murcielago.pdb -DUNICODE -DWIN32 -I"C:\Program" -I"Files" -I"(x86)\Microsoft" -I"Visual" -I"Studio" -I"12.0\VC\include" -I"." -I"C:\Qt\5.3\msvc2013_64\mkspecs\win32-msvc2013" -Fodebug\ @C:\Users\ARBOLO~1\AppData\Local\Temp\main.obj.15040.0.jom
    main.cpp
    ..\Murcielago\main.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such file or directory
    jom: D:\Documents\QtProjects\build-Murcielago-Desktop_Qt_5_3_MSVC2013_64bit-Debug\Makefile.Debug [debug\main.obj] Error 2
    jom: D:\Documents\QtProjects\build-Murcielago-Desktop_Qt_5_3_MSVC2013_64bit-Debug\Makefile [debug] Error 2
    10:03:06: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project Murcielago (kit: Desktop Qt 5.3 MSVC2013 64bit)
    When executing step "Make"
    @

    Now, Qt has all the ingredients to create an app, but it does not.
    Please note that if I download one of those installers for MinGW, the one that already includes the compiler, then it works. I don't have a test case when using a installer that includes VC++ compiler, because it does not exist.
    There are some who say,* but it works for me, how come it does not work for you*, however, I say, this is what Qt says, and show the error messages, if I use the MS-VSE2013 version of Qt.
    Is my system configuration wrong? Well, all I can say is that I have many applications installed in my system and only the Qt/VS combo does not work.

    [edit: added missing coding tags @ SGaist]


  • Lifetime Qt Champion

    @INCLUDEPATH += $$quote(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include)@

    Here's the problem, you're using single backslashes in your path. Either use double backslashes or better the unix forward slash



  • INCLUDEPATH += $$quote(C://Program Files (x86)//Microsoft Visual Studio 12.0//VC//include)

    Gives the same error as before

    INCLUDEPATH += $$quote(C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include)

    Ditto

    INCLUDEPATH += $$quote(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include)

    Same old, same old.

    This is my 101 posting, and Qt/VS is still not working :(

    SGaist, nice to have you in the conversation, but it seems to me that you are not aware of how Qt installs, since you are obviously drawing straws. An Engineer from Qt might be able to figure out where they went wrong or what is wrong with the installation.
    On the other hand, ambershark, thanks. I know that you are doing your best, but Qt/VS2013 does not work and I have the evidence to show. Let's be clear, it is not me who says I cannot compile the program, it is Qt that is saying, I cannot find my way around VS2013.
    I have not tried Qt with any other version of VS, and I will not do that to myself, no way! I know, and, I testify, that Qt works with MinGW-32, at least when it is included with the installer. But in the MS world, 32bit is not the standard anymore, thus, it is not prudent to build for anything less than 64bit.
    Now, have a wonderful weekend kids, I will put this Qt/VS thing to rest for the time being.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.