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. Building Qt-Creator fails [windows]
Forum Updated to NodeBB v4.3 + New Features

Building Qt-Creator fails [windows]

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 997 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.
  • I Offline
    I Offline
    Incredibuild
    wrote on last edited by
    #1

    Hello all, im trying to build qt from sources. I have tried to configure the project with cmake prebuilding and the following output occurs (errors...):

    **Microsoft Windows [Version 10.0.20348.768]
    (c) Microsoft Corporation. All rights reserved.

    C:\Users\Administrator>cd C:\Users\Administrator\Desktop\qt-creator\qt_build

    C:\Users\Administrator\Desktop\qt-creator\qt_build>cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=C:\Qt\Tools\QtCreator\bin;C:\Users\Administrator\Desktop\android-ndk-r23c-windows\android-ndk-r23c\toolchains\llvm\prebuilt\windows-x86_64\bin" C:\Users\Administrator\Desktop\qt-creator\src
    CMake Warning (dev) in CMakeLists.txt:
    No project() command is present. The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command. Add a line of
    code such as

    project(ProjectName)
    

    near the top of the file, but after cmake_minimum_required().

    CMake is pretending there is a "project(Project)" command on the first
    line.
    This warning is for project developers. Use -Wno-dev to suppress it.

    -- The C compiler identification is MSVC 19.32.31332.0
    -- The CXX compiler identification is MSVC 19.32.31332.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe
    -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - broken
    CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
    The C compiler

    "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe"
    

    is not able to compile a simple test program.

    It fails with the following output:

    Change Dir: C:/Users/Administrator/Desktop/qt-creator/qt_build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/Ninja/ninja.exe cmTC_848ba && [1/2] Building C object CMakeFiles\cmTC_848ba.dir\testCCompiler.c.obj
    [2/2] Linking C executable cmTC_848ba.exe
    FAILED: cmTC_848ba.exe
    cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_848ba.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_848ba.dir\testCCompiler.c.obj  /out:cmTC_848ba.exe /implib:cmTC_848ba.lib /pdb:cmTC_848ba.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    RC Pass 1: command "rc /fo CMakeFiles\cmTC_848ba.dir/manifest.res CMakeFiles\cmTC_848ba.dir/manifest.rc" failed (exit code 0) with the following output:
    The system cannot find the file specified
    ninja: build stopped: subcommand failed.
    

    CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
    CMakeLists.txt

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Administrator/Desktop/qt-creator/qt_build/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/Administrator/Desktop/qt-creator/qt_build/CMakeFiles/CMakeError.log".**

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Incredibuild
      wrote on last edited by
      #2

      the command was: cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=C:\Qt\Tools\QtCreator\bin;C:\Users\Administrator\Desktop\android-ndk-r23c-windows\android-ndk-r23c\toolchains\llvm\prebuilt\windows-x86_64\bin" C:\Users\Administrator\Desktop\qt-creator\src

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

        How are you trying to build Qt Creator? I can see Android there, but also Visual Studio 2022. Not a very common case.

        Qt Creator has in the documentation https://code.qt.io/cgit/qt-creator/qt-creator.git/about/ information about the build procedure.

        In essence it's like:

        $ "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
        
        $ cmake -D CMAKE_BUILD_TYPE=Debug -G Ninja -D CMAKE_PREFIX_PATH=c:/Qt/6.3.1/msvc2019_64  -S c:/Projects/QtCreator -B c:/Projects/QtCreator-Build-Debug
        
        $ cmake --build c:/Projects/QtCreator-Build-Debug
        
        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