Results 1 to 13 of 13

Thread: HELP! QtCreator can't find the QtSDK headers anymore!

  1. #1
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: HELP! QtCreator can't find the QtSDK headers anymore!

    OK,

    So I wanted to build a "release" executable.

    I couldn't get the "release" version to run without cloning the qtgui4.dll and qtcore4.dll into the same directory as the "release" exe of the project.

    I shoulda left well enough alone.

    I went looking for how to make the app run without having to clone the dll files, and, according to the instructions I found, I added these directories to to my path.

    C:\QtSDK\Desktop\Qt\4.7.3\msvc2008\bin;C:\QtSDK\De sktop\Qt\4.7.3\mingw\

    Now the Qt Creator is acting as though all the QtSDK header files are not there anymore. It's putting wavy lines under all the Qt header files and the syntax highlighting for the Qt classes is gone. I tried adding the path to the QtSDK include files in my project, but no joy.

    Can anybody tell me how to get back on track without having to re-install the QtSDK?

    By the way, I did not type "De sktop", I typed "Desktop" for some reason that's how this web gui wants to display it. Very weird. Just not my day.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: HELP! QtCreator can't find the QtSDK headers anymore!

    C:\QtSDK\Desktop\Qt\4.7.3\msvc2008\bin;C:\QtSDK\De sktop\Qt\4.7.3\mingw\
    Not good, you are giving conflicting paths.
    Either MSVC OR MinGW.
    Also, your MSVC path is the bin path, and no headers can be found there.
    Make sure you are giving the root of your Qt installation path.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    paie (23rd August 2011)

  4. #3
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: HELP! QtCreator can't find the QtSDK headers anymore!

    > Make sure you are giving the root of your Qt installation path.

    By root, do you mean to leave out \bin or \include ?

    For example,

    C:\QtSDK\Desktop\Qt4.7.3

    ... or should I be more explicit, with, as you suggest, just one header directory ...

    C:\QtSDK\Desktop\Qt4.7.3\mingw\include

  5. #4
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: HELP! QtCreator can't find the QtSDK headers anymore!

    I still see wavy lines under the QtGui/ header files, for example,
    #include <QtGui/QWidget>

    And the mouseover says, "No such file or directory"

    I took the following steps to try to fix this problem, but they failed to fix the problem.

    • uninstalled QtSDK.
    • removed from the registry all referenes to QtSDK and qtcreator.
    • Deleted any and all remaining QtSDK directories
    • ran a registry cleaner to delete any unused or dead-end keys.
    • rebooted.
    • downloaded and installed the latest install image Qt_SDK_Win_offline_v1_1_3_en.exe


    When I installed, the installer provided a checkbox that asked if I wanted to remove all prior QtSDK settings. I checked the box, but I thought I had removed all traces of QtSDK from my system.

    Anyway, I still have the problem where qtcreator cannot find the QtGui header files, yet the build executes without a hitch.

    The QTDIR path is defined as
    C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\

    I just cannot figure out what the problem is.

  6. #5
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Eureka! - almost :)

    Added the following line to my project file ...
    Qt Code:
    1. INCLUDEPATH += c:\QtSDK\desktop\qt\4.7.4\msvc2008\include
    To copy to clipboard, switch view to plain text mode 

    Absolute paths are bad, but it works for me.

    There must be something missing in the environment that would allow the directories to be relative.

    If anybody knows what might be missing, I would appreciate hearing from you.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Eureka! - almost :)

    Does QtCreator properly detect your Qt versions? You define those by setting path to qmake from a particular Qt version and then Creator should be able to do the rest by itself.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. The following user says thank you to wysota for this useful post:

    paie (24th September 2011)

  9. #7
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eureka! - almost :)

    Wow, thanks for responding!

    Quote Originally Posted by wysota View Post
    Does QtCreator properly detect your Qt versions?
    How would I be able to determine that? The build completes without errors.

    You define those by setting path to qmake from a particular Qt version and then Creator should be able to do the rest by itself.
    You mean by adding something like the following to the end of the "path" environment variable in Windows?
    Qt Code:
    1. c:\QtSDK\desktop\Qt\4.7.4\msvc2008\bin\qmake.exe;
    To copy to clipboard, switch view to plain text mode 
    That's the path to qmake.exe that I see in Tools->Options->Qt4->QtVersions

  10. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Eureka! - almost :)

    Quote Originally Posted by paie View Post
    How would I be able to determine that?
    Go to Tools > Options > Qt4 and take a look at "Qt versions" tab. If you want headers from QtSDK to be available, a version from QtSDK should be mentioned there. Remember the SDK consists of the toolchain (MinGW), Qt built for the toolchain and QtCreator along with Qt libs built for it. You shouldn't put any other Qt builds there, they are not part of the SDK, it's better to choose a separate directory so that you're sure nothing gets mixed. You can manually add all the Qt versions you have there by settings paths to appropriate qmake binaries.

    You mean by adding something like the following to the end of the "path" environment variable in Windows?
    No.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. The following user says thank you to wysota for this useful post:

    paie (24th September 2011)

  12. #9
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eureka! - almost :)

    Quote Originally Posted by wysota View Post
    Go to Tools > Options > Qt4 and take a look at "Qt versions" tab.
    No.
    Here is what I see there:

    Qt Code:
    1. Auto-dedtected
    2. Qt 4.7.4 for Desktopo - MSVC2008 (QtSDK) c:\qtsdk\desktop\qt\4.7.4\msvc2008\bin\qmake.exe
    3. Simulator Qt for Visual Studio 2008 (QtSDK) c:\qtsdk\simulator\qt\msvc2008\bin\qmake.exe
    4. Qt 4.7.4 for Symbian Belle (QtSDK) c:\qtsdk\symbian\sdks\symbiansr1qt474\bin\qmake.exe
    5. Qt 4.7.3 for Symbian ^3 (QtSDK) c:\qtsdk\symbian\sdks\symbian3qt473\bin\qmake.exe
    6. Qt.4.7.3 for Symbian ^1 (QtSDK) c:\qtsdk\symbian\sdks\symbian1qt473\bin\qmake.exe
    7. Manual
    8. Simulator Qt for Visual Studio 2008 (Qt SDK) (2) c:\qtsdk\simulator\qt\msvc2008\bin\qmake.exe
    To copy to clipboard, switch view to plain text mode 
    Last edited by paie; 24th September 2011 at 01:23.

  13. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Eureka! - almost :)

    This doesn't correspond to what you have written in the initial post. Can you explain that?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. The following user says thank you to wysota for this useful post:

    paie (24th September 2011)

  15. #11
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eureka! - almost :)

    Quote Originally Posted by wysota View Post
    This doesn't correspond to what you have written in the initial post. Can you explain that?
    Yes, I'm sorry.

    I explained part pf what I did in comment #4 above (http://www.qtcentre.org/threads/4389...891#post203891)

    What I left out of that post is that I did not install mingw this time, because I thought it would simplify things. That is, I thought mingw would unnecessarily confuse things, since I already have msvc installed.

  16. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Eureka! - almost :)

    Which of the detected Qt versions do you use for your projects? Check, don't guess nor assume.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  17. The following user says thank you to wysota for this useful post:

    paie (24th September 2011)

  18. #13
    Join Date
    Aug 2011
    Posts
    33
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Eureka! - almost :)

    Quote Originally Posted by wysota View Post
    Which of the detected Qt versions do you use for your projects? Check, don't guess nor assume.
    In Projects->Build Settings I see ...

    Qt Code:
    1. Edit build configuration: [ Qt 4.7.4 for Desktop - MSVC2008 (QtSDK) Debug ]
    2.  
    3. Qt version: [ Qt 4.7.4 for Desktop - MSVC2008 (QtSDK) ]
    4.  
    5. Tool Chain: [ Microsoft Visual C++ Compiler 9.0 (x86) ]
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QtCreator can't find Qt + failed uninstall of earlier version
    By MattPhillips in forum Installation and Deployment
    Replies: 6
    Last Post: 21st March 2011, 13:35
  2. qtsdk installtion works,but nothing comes like qtcreator-urgent
    By savaliya_ambani in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd July 2010, 13:53
  3. Replies: 18
    Last Post: 21st May 2010, 15:08
  4. Replies: 2
    Last Post: 24th May 2009, 17:05
  5. Microsoft SDKs' headers don't work in QtCreator
    By Krzysiek in forum General Programming
    Replies: 0
    Last Post: 5th May 2009, 17:20

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.