Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No CMake configuration found - Windows
Forum Updated to NodeBB v4.3 + New Features

No CMake configuration found - Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 5.2k 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.
  • cristian-adamC Offline
    cristian-adamC Offline
    cristian-adam
    wrote on last edited by
    #2

    @kl11 said in No CMake configuration found - Windows:

    CMake Error at ports/atlmfc/portfile.cmake:7 (message):
    Unable to locate 'afxres.h'. Ensure you have installed the ATL/MFC
    component of Visual Studio.
    Call Stack (most recent call first):
    scripts/ports.cmake:145 (include)

    Is the error that you need to fix. This is done by starting Visual Studio setup and selecting ATL/MFC component.

    K 1 Reply Last reply
    1
    • cristian-adamC cristian-adam

      @kl11 said in No CMake configuration found - Windows:

      CMake Error at ports/atlmfc/portfile.cmake:7 (message):
      Unable to locate 'afxres.h'. Ensure you have installed the ATL/MFC
      component of Visual Studio.
      Call Stack (most recent call first):
      scripts/ports.cmake:145 (include)

      Is the error that you need to fix. This is done by starting Visual Studio setup and selecting ATL/MFC component.

      K Offline
      K Offline
      kl11
      wrote on last edited by
      #3

      @cristian-adam thankyou for the quick response. I'm sorry to ask but I don't have a lot of experience compiling, packaging and building. I would be very appreciative if you could describe how to do this or link a guide you recommend on the matter. Again thankyou

      1 Reply Last reply
      0
      • cristian-adamC Offline
        cristian-adamC Offline
        cristian-adam
        wrote on last edited by
        #4

        On your Windows machine (where I assume you have Visual Studio 2019 installed):

        1. Press 🪟 key, then type "Visual Studio Installer"
        2. Select your Visual Studio 2019 installation and click on "Modify" button.
        3. Then in the "Desktop development with C++" at the "Optional" packages select the packages:
          • C++ ATL for latest v142 build tools
          • C++ MFC for latest v142 build tools
        4. Click on the bottom "Modify" button and that should be it
        K 1 Reply Last reply
        2
        • K Offline
          K Offline
          kl11
          wrote on last edited by
          #5

          Thankyou for the additional help, however the issues still persist. I'm going to try re cloning the branch. Do I need to have visual studio running the project in tandem with Qt?

          1 Reply Last reply
          0
          • cristian-adamC Offline
            cristian-adamC Offline
            cristian-adam
            wrote on last edited by
            #6

            You don't need Visual Studio open in parallel. You just need the compiler.

            But, the screenshot that you've provided has more issues:

            1. No ninja binary, you need to have ninja-build installed. Either from Qt SDK or github.
            2. It looks you are using an Android Kit

            If you are trying to target Android, then it's a bit more complicated with vcpkg, which is trying to build for x64-windows.

            1 Reply Last reply
            2
            • cristian-adamC cristian-adam

              On your Windows machine (where I assume you have Visual Studio 2019 installed):

              1. Press 🪟 key, then type "Visual Studio Installer"
              2. Select your Visual Studio 2019 installation and click on "Modify" button.
              3. Then in the "Desktop development with C++" at the "Optional" packages select the packages:
                • C++ ATL for latest v142 build tools
                • C++ MFC for latest v142 build tools
              4. Click on the bottom "Modify" button and that should be it
              K Offline
              K Offline
              kl11
              wrote on last edited by
              #7

              @cristian-adam I launched the project in VS and recieved these two errors:

              0866dbd7-7528-418c-ae02-dfdc2800c543-image.png

              Inspecting the logs for the first error I find

              [1/1] cmd /c "cd .. && "C:/Users/KianLeggett/Documents/QField/vcpkg/base/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/bin/cmake.exe" "C:/Users/KianLeggett/Documents/QField/vcpkg/base/buildtrees/libspatialindex/src/1.9.3-6cf20331d2.clean" "-DCMAKE_DEBUG_POSTFIX=d" "-DSIDX_BUILD_TESTS:BOOL=OFF" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Users/KianLeggett/Documents/QField/vcpkg/base/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Users/KianLeggett/Documents/QField/vcpkg/base/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Users/KianLeggett/Documents/QField/vcpkg/base" "-DZ_VCPKG_ROOT_DIR=C:/Users/KianLeggett/Documents/QField/vcpkg/base" "-D_VCPKG_INSTALLED_DIR=C:/Users/KianLeggett/Documents/QField/out/build/x64-Debug/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-Ax64" "-G" "Visual Studio 17 2022" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Users/KianLeggett/Documents/QField/vcpkg/base/packages/libspatialindex_x64-windows""
              FAILED: ../CMakeCache.txt 
              cmd /c "cd .. && "C:/Users/KianLeggett/Documents/QField/vcpkg/base/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/bin/cmake.exe" "C:/Users/KianLeggett/Documents/QField/vcpkg/base/buildtrees/libspatialindex/src/1.9.3-6cf20331d2.clean" "-DCMAKE_DEBUG_POSTFIX=d" "-DSIDX_BUILD_TESTS:BOOL=OFF" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Users/KianLeggett/Documents/QField/vcpkg/base/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Users/KianLeggett/Documents/QField/vcpkg/base/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Users/KianLeggett/Documents/QField/vcpkg/base" "-DZ_VCPKG_ROOT_DIR=C:/Users/KianLeggett/Documents/QField/vcpkg/base" "-D_VCPKG_INSTALLED_DIR=C:/Users/KianLeggett/Documents/QField/out/build/x64-Debug/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-Ax64" "-G" "Visual Studio 17 2022" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Users/KianLeggett/Documents/QField/vcpkg/base/packages/libspatialindex_x64-windows""
              -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
              -- The C compiler identification is unknown
              -- The CXX compiler identification is unknown
              CMake Error at CMakeLists.txt:8 (project):
                No CMAKE_C_COMPILER could be found.
              
              
              
              CMake Error at CMakeLists.txt:8 (project):
                No CMAKE_CXX_COMPILER could be found.
              
              
              
              -- Configuring incomplete, errors occurred!
              See also "C:/Users/KianLeggett/Documents/QField/vcpkg/base/buildtrees/libspatialindex/x64-windows-rel/CMakeFiles/CMakeOutput.log".
              See also "C:/Users/KianLeggett/Documents/QField/vcpkg/base/buildtrees/libspatialindex/x64-windows-rel/CMakeFiles/CMakeError.log".
              ninja: build stopped: subcommand failed.
              

              and the logs for the other error

              CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:128 (message):
                  Command failed: ninja -v
                  Working Directory: C:/Users/KianLeggett/Documents/QField/vcpkg/base/buildtrees/libspatialindex/x64-windows-rel/vcpkg-parallel-configure
                  Error code: 1
                  See logs for more information:
                    C:\Users\KianLeggett\Documents\QField\vcpkg\base\buildtrees\libspatialindex\config-x64-windows-out.log
              
              Call Stack (most recent call first):
                scripts/cmake/vcpkg_configure_cmake.cmake:345 (vcpkg_execute_required_process)
                ports/libspatialindex/portfile.cmake:11 (vcpkg_configure_cmake)
                scripts/ports.cmake:145 (include)
              
              
              Error: Building package libspatialindex:x64-windows failed with: BUILD_FAILED
              Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.
              Then check for known issues at:
                https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libspatialindex
              You can submit a new issue at:
                https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[libspatialindex]+Build+error
              including:
                package: libspatialindex[core]:x64-windows -> 1.9.3
                  vcpkg-tool version: 2022-03-25-d9702d9d89b9468c32efc3f18fb84c3021d7dbae
                  vcpkg-scripts version: 5d3e0e8a2 2022-03-30 (4 months ago)
              
              

              These are copies of the errors I'm facing within Qt creator, do I bother fixing them in Visual studio or Qt?

              1 Reply Last reply
              0
              • cristian-adamC Offline
                cristian-adamC Offline
                cristian-adam
                wrote on last edited by
                #8

                Visual Studio is somehow missing the C and C++ compilers. You need to make sure you have a valid Visual Studio setup for developing C and C++ applications.

                K 1 Reply Last reply
                2
                • cristian-adamC cristian-adam

                  Visual Studio is somehow missing the C and C++ compilers. You need to make sure you have a valid Visual Studio setup for developing C and C++ applications.

                  K Offline
                  K Offline
                  kl11
                  wrote on last edited by
                  #9

                  @cristian-adam Hey there, So ive had a look in the VS installer tool and I do have both c and c++ compilers. I also checked the Qt maintenence tool and I found ninja is already installed.

                  1 Reply Last reply
                  0
                  • cristian-adamC Offline
                    cristian-adamC Offline
                    cristian-adam
                    wrote on last edited by
                    #10

                    Qt Creator has a "Hello World" vcpkg CMake project at https://github.com/qt-creator/qt-creator/tree/master/tests/manual/vcpkg

                    You should be able to open the project in Qt Creator and build it like this:

                    alt text

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kl11
                      wrote on last edited by
                      #11

                      So I managed to get around the issue

                      This is how I solved it:

                      1. Uninstall Visual Studio + packages, Qt and everything related to it. Even like the SDK, NDK + JDK
                      2. Run a clean with CCleaner
                      3. Restart machine
                      4. Re install Qt + Visual studio and appropriate packages
                      5. clone vcpkg repository
                      6. follow build instructions in there and create an executable

                      However I have encountered a different error which I will post in another forum entry

                      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