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. VS2022 Qt5.15.2 build static from source ERROR
Forum Updated to NodeBB v4.3 + New Features

VS2022 Qt5.15.2 build static from source ERROR

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 580 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
    injertao
    wrote on last edited by
    #1

    cmd:
    SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
    SET SRC_DIR="C:\Work\Qt\5.15.2\Src"
    SET BUILD_DIR="C:\Work\Qt\5.15.2\Build"
    SET INSTALL_DIR="C:\Work\Qt\5.15.2\msvc2019_64_static_size"
    SET CONFIGURE_OPTIONS=-platform win32-msvc -release -mp -opensource -confirm-license -static -static-runtime -optimize-size

    call %VS_ENVIRONMENT%
    mkdir %BUILD_DIR%
    mkdir %INSTALL_DIR%
    cd %BUILD_DIR%
    call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
    cmake --build . --parallel
    cmake --install .
    cmake --install . --config Debug
    cd %INSTALL_DIR%
    rmdir %BUILD_DIR% /Q /S
    pause

    return:
    79e164bd-1a23-4f14-b196-1787130debe1-image.png

    Qt6.3 I can reconstruct it perfectly, but it does not support win7, so I want to try 5.15.2

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      Qt 5 is not built with cmake :) Do what the configure output suggest, and just run "nmake" (or jom.exe, if you want faster builds).

      Director R&D, The Qt Company

      I 1 Reply Last reply
      0
      • kkoehneK kkoehne

        Qt 5 is not built with cmake :) Do what the configure output suggest, and just run "nmake" (or jom.exe, if you want faster builds).

        I Offline
        I Offline
        injertao
        wrote on last edited by injertao
        #3

        @kkoehne

        cd C:\Work\Qt\5.15.2\Src

        configure.bat -platform win32-msvc -release -mp -opensource -confirm-license -static -static-runtime -optimize-size -prefix "C:\Work\Qt\5.15.2\msvc2019_64_static_size"

        return:
        Qt is now configured for building. Just run 'nmake'.
        Once everything is built, you must run 'nmake install'.
        Qt will be installed into 'C:\Work\Qt\5.15.2\msvc2019_64_static_size'.

        Prior to reconfiguration, make sure you remove any leftovers from
        the previous build.

        I went on :nmake

        return:
        'cmd' is not recognized as an internal or external command,
        operable program or batch file.
        NMAKE : fata1 error U1077:return code "0x2"
        NMAKE : fata1 error U1077:"cd":return code "0x2"

        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