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. compile Qt from repository using linux
Qt 6.11 is out! See what's new in the release blog

compile Qt from repository using linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • QT-static-prgmQ Offline
    QT-static-prgmQ Offline
    QT-static-prgm
    wrote on last edited by
    #1

    Hey,

    i want to compile Qt from source multiple times.

    I found this tutorial: http://doc.qt.io/qt-5/linux-building.html
    But i'd prefer to download from a git repo, because i want to download and compile it within a script.
    Furthermore how would i clean and rebuild?? As far as i remember confclean is no more possible.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can use the instructions above in a script... but anyway, since you ask for git repo, here is a guide especially for that use case: https://wiki.qt.io/Building_Qt_5_from_Git

      If you want to build several times from the same source code, simply run configure and make in another folder. Example:

      # Let's assume you have Qt source code in folder qt-src
      mkdir qt-build1
      cd qt-build1
      ./../qt-src/configure -prefix $PWD
      make 
      # Now rinse and repeat for your other builds
      cd ..
      mkdir qt-build2
      cd qt-build2
      ./../qt-src/configure -prefix $PWD
      make 
      

      If you want to keep all the build artifacts away from results (include files and libraries), you need to point -prefix to yet another directory. And you will have to run make install after compilation is done, so that the build system has a chance to copy the libs to your prefix folder.

      (Z(:^

      1 Reply Last reply
      4

      • Login

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