CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2012
    Posts
    5

    Visual C++ 2015 search path not working

    Even after including .h folder to Projects>C++ General>Additional Include Directory it cannot detect .h files.

    I included, C:\Qt\Qt5.6.0\5.6\msvc2015_64\include to additional include directory

    And Wrote the code in c++,

    #include "QtWidgets/qapplication.h"
    It cannot find QtWidgets directory.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by Freiza View Post
    ...
    #include "QtWidgets/qapplication.h"
    It cannot find QtWidgets directory.
    And what is the exact path for "QtWidgets/qapplication.h"?
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2012
    Posts
    5

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by VictorN View Post
    And what is the exact path for "QtWidgets/qapplication.h"?
    C:\Qt\Qt5.6.0\5.6\msvc2015_64\include

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by Freiza View Post
    C:\Qt\Qt5.6.0\5.6\msvc2015_64\include
    So, if you would type in explorer
    Code:
    C:\Qt\Qt5.6.0\5.6\msvc2015_64\include\QtWidgets/qapplication.h
    then got the qapplication.h file opened?
    Victor Nijegorodov

  5. #5
    Join Date
    Feb 2012
    Posts
    5

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by VictorN View Post
    So, if you would type in explorer
    Code:
    C:\Qt\Qt5.6.0\5.6\msvc2015_64\include\QtWidgets/qapplication.h
    then got the qapplication.h file opened?
    Yes it does open.


    Btw I tried all combinations QtWidgets/qapplication.h , QtWidgets\qapplication.h and QtWidgets\\qapplication.h
    using angle brackets and double quotes.

  6. #6
    Join Date
    Feb 2012
    Posts
    5

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by VictorN View Post
    So, if you would type in explorer
    Code:
    C:\Qt\Qt5.6.0\5.6\msvc2015_64\include\QtWidgets/qapplication.h
    then got the qapplication.h file opened?
    Today, I noticed that if I change my solution configuration from debug to release it detects .h file and when I switch to debug configuration it again stops detecting the file.
    Now, what should I do?

  7. #7
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Visual C++ 2015 search path not working

    Properties are specific to a configuration. If you are building for release and debug you need to change the properties of both configurations as required.

    At the top of Project/Properties it states for which configuration/platform the properties apply. You can also use the Configuration Manager by pressing the right top button.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  8. #8
    Join Date
    Feb 2012
    Posts
    5

    Re: Visual C++ 2015 search path not working

    Quote Originally Posted by 2kaud View Post
    Properties are specific to a configuration. If you are building for release and debug you need to change the properties of both configurations as required.

    At the top of Project/Properties it states for which configuration/platform the properties apply. You can also use the Configuration Manager by pressing the right top button.
    Dear Sir, I just figured that out this thing just a minute before you commented.

    This thing was a nightmare to me I even reinstalled visual studio thinking it was a bug.

    Thank You very much. I feel so much relieved. Thank You

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured