Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory
Forum Updated to NodeBB v4.3 + New Features

Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory

Scheduled Pinned Locked Moved Unsolved Qt 6
6 Posts 3 Posters 2.1k 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.
  • C Offline
    C Offline
    ConorCodes
    wrote on 13 Oct 2021, 13:59 last edited by
    #1

    Hello,

    I am having an issue building a project I have taken over from another developer.

    I am using Visual Studio 2019 with Qt 6.2.0 and receive the error Cannot open include file: 'QtConcurrent': No such file or directory when I try build the project. The #include <QtConcurrent> in my source file is highlighted.

    So far I have added concurrent to the Qt Modules under Qt Project Settings.
    Also under C/C++ -> Command line in the All Options "C:\Qt\6.2.0\msvc2019_64\include\QtConcurrent" exists.

    I was wondering if anyone could help me discover what I am missing please?

    Thanks,

    N K 2 Replies Last reply 13 Oct 2021, 14:11
    0
    • C ConorCodes
      13 Oct 2021, 13:59

      Hello,

      I am having an issue building a project I have taken over from another developer.

      I am using Visual Studio 2019 with Qt 6.2.0 and receive the error Cannot open include file: 'QtConcurrent': No such file or directory when I try build the project. The #include <QtConcurrent> in my source file is highlighted.

      So far I have added concurrent to the Qt Modules under Qt Project Settings.
      Also under C/C++ -> Command line in the All Options "C:\Qt\6.2.0\msvc2019_64\include\QtConcurrent" exists.

      I was wondering if anyone could help me discover what I am missing please?

      Thanks,

      N Offline
      N Offline
      n-2204
      wrote on 13 Oct 2021, 14:11 last edited by
      #2

      @ConorCodes May be you can try this-> Right click on project on visual studio -> click properties (on the bottom) -> go to C/C++ -> all options -> find additional include directories and there add path to your QT include folder

      1 Reply Last reply
      1
      • C ConorCodes
        13 Oct 2021, 13:59

        Hello,

        I am having an issue building a project I have taken over from another developer.

        I am using Visual Studio 2019 with Qt 6.2.0 and receive the error Cannot open include file: 'QtConcurrent': No such file or directory when I try build the project. The #include <QtConcurrent> in my source file is highlighted.

        So far I have added concurrent to the Qt Modules under Qt Project Settings.
        Also under C/C++ -> Command line in the All Options "C:\Qt\6.2.0\msvc2019_64\include\QtConcurrent" exists.

        I was wondering if anyone could help me discover what I am missing please?

        Thanks,

        K Offline
        K Offline
        KroMignon
        wrote on 13 Oct 2021, 14:55 last edited by KroMignon
        #3

        @ConorCodes said in Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory:

        I was wondering if anyone could help me discover what I am missing please?

        Do you have add QtConcurrent package in your project?
        For qmake project add QT += concurrent in PRO file
        For cmake, add following in CMakeLists.txt:

        find_package(Qt6 COMPONENTS Concurrent REQUIRED)
        target_link_libraries(mytarget PRIVATE Qt6::Concurrent)
        

        cf: https://doc.qt.io/qt-6/qtconcurrent.html

        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

        C 1 Reply Last reply 14 Oct 2021, 09:39
        3
        • K KroMignon
          13 Oct 2021, 14:55

          @ConorCodes said in Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory:

          I was wondering if anyone could help me discover what I am missing please?

          Do you have add QtConcurrent package in your project?
          For qmake project add QT += concurrent in PRO file
          For cmake, add following in CMakeLists.txt:

          find_package(Qt6 COMPONENTS Concurrent REQUIRED)
          target_link_libraries(mytarget PRIVATE Qt6::Concurrent)
          

          cf: https://doc.qt.io/qt-6/qtconcurrent.html

          C Offline
          C Offline
          ConorCodes
          wrote on 14 Oct 2021, 09:39 last edited by
          #4

          @KroMignon said in Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory:

          QT += concurrent

          Hello KroMignon,

          Thank you for your response.

          I am using qmake to build my Visual Studio project, do you know where I can find the correct .pro file?

          I tried to add QT += concurrent to QtTestTool\Debug\qmake\temp qtvars.pro is this the correct location as I'm trying to run my program in debug?

          Thanks

          K 1 Reply Last reply 14 Oct 2021, 09:41
          0
          • C ConorCodes
            14 Oct 2021, 09:39

            @KroMignon said in Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory:

            QT += concurrent

            Hello KroMignon,

            Thank you for your response.

            I am using qmake to build my Visual Studio project, do you know where I can find the correct .pro file?

            I tried to add QT += concurrent to QtTestTool\Debug\qmake\temp qtvars.pro is this the correct location as I'm trying to run my program in debug?

            Thanks

            K Offline
            K Offline
            KroMignon
            wrote on 14 Oct 2021, 09:41 last edited by
            #5

            @ConorCodes said in Visual Studio Cannot open include file 'QtConcurrent'L No such file or directory:

            I tried to add QT += concurrent to QtTestTool\Debug\qmake\temp qtvars.pro is this the correct location as I'm trying to run my program in debug?

            The PRO file is your project file!!!!

            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

            1 Reply Last reply
            3
            • C Offline
              C Offline
              ConorCodes
              wrote on 14 Oct 2021, 11:15 last edited by
              #6

              The solution which solved my issue was editing the VC++ Project file and ensuring that concurrent was in <QtModules> inside each <PropertyGroup>

              <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
              <QtInstall>Qt 6.2.0</QtInstall>
              <QtModules>concurrent;core;gui;widgets</QtModules>
              <QtBuildConfig>debug</QtBuildConfig>
              </PropertyGroup>

              1 Reply Last reply
              0

              1/6

              13 Oct 2021, 13:59

              • Login

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