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 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 KroMignonK 2 Replies Last reply
    0
    • C ConorCodes

      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 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

        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,

        KroMignonK Offline
        KroMignonK Offline
        KroMignon
        wrote on 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
        3
        • KroMignonK KroMignon

          @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 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

          KroMignonK 1 Reply Last reply
          0
          • C ConorCodes

            @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

            KroMignonK Offline
            KroMignonK Offline
            KroMignon
            wrote on 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 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

              • Login

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