Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. include MinGW include in QT Creator on Windows

include MinGW include in QT Creator on Windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 897 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dalexandr
    wrote on last edited by
    #1

    Hello,

    I am using QT Creator 4.11.0 with MinGW on Windows 10 and I am trying to include header files from MinGW include path. They are visible by autocomplete but code parser complains it can't find it and compilation fails as well. Some 5 years old post I have found on the internet described the same problem and there it was solved by adding to path

    D:\Qt\Tools\mingw730_64\bin
    D:\Qt\5.12.0\mingw73_64\bin
    

    In my case the path was already set and the only thing that helped me was adding include folder manually in .pro file:

    INCLUDEPATH += D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/
    

    The code compiles and works fine, however now I get a warning "The code model couldn't parse included file, which might lead to incorrect code completion and highlighting" with several header files listed from the newly included folder.

    The question is: is this warning an issue of Clang plugin and I am adding this include path correctly? Or should I set up MinGW in QT Creator in some different way?

    What confuses me is that in the debug folder for any project I see .qmake.stash file with the following content:

    QMAKE_CXX.INCDIRS = \
        D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ \
        D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \
        D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward \
        D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include \
        D:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed \
        D:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include
    QMAKE_CXX.LIBDIRS = \
        D \
        /Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/;D \
        /Qt/Tools/mingw730_64/lib/gcc/;D \
        /Qt/Tools/mingw730_64/x86_64-w64-mingw32/lib/;D \
        /Qt/Tools/mingw730_64/lib/;D \
        /Qt/Tools/mingw730_64/lib
    .....
    .....
    

    I am only guessing, since my understanding of the processes here is not deep, but it seems the include path in question is already known.

    Thanks

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved