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. Building Qt Creator from source
Forum Updated to NodeBB v4.3 + New Features

Building Qt Creator from source

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 4 Posters 3.3k 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.
  • aha_1980A aha_1980

    Hi @JacobNovitsky,

    it may be a stupid question, but why don't you just install Qt and Creator with the Online Installer?

    https://download.qt.io/official_releases/online_installers/

    That way, everything is correctly set up plus you can easily upgrade. (by the way, the current version is Creator 12.0)

    Or do you have a specific reason to compile from source?

    In this case, you have to register the Qt version yourself in Creators settings.

    Regards

    J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by JacobNovitsky
    #8

    @aha_1980 need offline installer, period :)
    I almost done actually, can you help with question above pls?

    aha_1980A 1 Reply Last reply
    0
    • J JacobNovitsky

      @aha_1980 need offline installer, period :)
      I almost done actually, can you help with question above pls?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #9

      @JacobNovitsky

      in this case, you have to follow the documentation. The following pages should give you some insight:

      https://doc.qt.io/qtcreator/creator-project-qmake.html
      https://doc.qt.io/qtcreator/creator-tool-chains.html
      https://doc.qt.io/qtcreator/creator-debuggers.html
      https://doc.qt.io/qtcreator/creator-targets.html

      Regards

      Qt has to stay free or it will die.

      J 1 Reply Last reply
      0
      • aha_1980A aha_1980

        @JacobNovitsky

        in this case, you have to follow the documentation. The following pages should give you some insight:

        https://doc.qt.io/qtcreator/creator-project-qmake.html
        https://doc.qt.io/qtcreator/creator-tool-chains.html
        https://doc.qt.io/qtcreator/creator-debuggers.html
        https://doc.qt.io/qtcreator/creator-targets.html

        Regards

        J Offline
        J Offline
        JacobNovitsky
        wrote on last edited by
        #10

        @aha_1980 manually found kit and set path to qmake
        I installed qt creator from apt, but version is much lower then needed
        how to install fresh qt creator from source?

        aha_1980A C 2 Replies Last reply
        0
        • J JacobNovitsky

          @aha_1980 manually found kit and set path to qmake
          I installed qt creator from apt, but version is much lower then needed
          how to install fresh qt creator from source?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #11

          @JacobNovitsky See https://wiki.qt.io/Building_Qt_Creator_from_Git

          Qt has to stay free or it will die.

          aha_1980A 1 Reply Last reply
          0
          • aha_1980A aha_1980

            @JacobNovitsky See https://wiki.qt.io/Building_Qt_Creator_from_Git

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #12

            @JacobNovitsky

            I have another idea: you could download the offline installer from https://download.qt.io/official_releases/qtcreator/12.0/12.0.1/ to avoid compiling Creator yourself.

            Regards

            Qt has to stay free or it will die.

            J 1 Reply Last reply
            1
            • aha_1980A aha_1980

              @JacobNovitsky

              I have another idea: you could download the offline installer from https://download.qt.io/official_releases/qtcreator/12.0/12.0.1/ to avoid compiling Creator yourself.

              Regards

              J Offline
              J Offline
              JacobNovitsky
              wrote on last edited by
              #13

              @aha_1980 I downloaded, and building it, but there is slight confusion, please lit some light upon that:

              I already built sources using official guide from https://doc.qt.io/qt-6/linux-building.html and its located > /usr/local/Qt-6.4.2;

              Pls note I used the same commands:
              cmake --build . --parallel
              cmake --install .

              Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:

              Linux and macOS

              These instructions assume that Ninja is installed and in the PATH, Qt Creator
              sources are located at /path/to/qtcreator_sources, Qt is installed in
              /path/to/Qt, and LLVM is installed in /path/to/llvm.

              Note that if you install Qt via the online installer, the path to Qt must
              include the version number and compiler ABI. The path to the online installer
              content is not enough.

              Note that /path/to/Qt doesn't imply the full path depth like:
              $USER/Qt/6.2.4/gcc_64/lib/cmake/Qt6, but only $USER/Qt/6.2.4/gcc_64.

              See instructions on how to
              get LLVM.

              ```
              

              mkdir qtcreator_build
              cd qtcreator_build

              cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources
              cmake --build .
              
              
              **I use command**
              
              

              cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
              cmake --build .

              Confusion:
              Now I have same building ouput, same time to build as I took to build sources
              [1200/1000] Building Cxx object...
              
              1. Build sources
              2. Build Qt creator
              
              Is this way correct?
              Not sure why is re-building sources, as I already pointed to Qt installed
              

              cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2

              maybe root is not correct or bad syntax?
              1 Reply Last reply
              0
              • J JacobNovitsky

                @aha_1980 manually found kit and set path to qmake
                I installed qt creator from apt, but version is much lower then needed
                how to install fresh qt creator from source?

                C Offline
                C Offline
                ChrisW67
                wrote on last edited by
                #14

                @JacobNovitsky said in Building Qt Creator from source:

                I installed qt creator from apt, but version is much lower then needed how to install fresh qt creator from source?

                Seriously, don't build Qt Creator and/or Qt from source code if you do not have to. You started this thread failing to build Qt Creator from source, changed to installing the Ubuntu package binaries^^, and then flipped back to building Qt Creator from source (with an unconnected reference to Qt 6.4 libraries built).

                ^^ While not the latest Qt Creator version it is perfectly able to build Qt projects using any version of Qt 5 or 6 and matching compiler tools you manage to install.

                Install the prebuilt, easy-to-install current version of Qt Creator, one or more Qt library versions, and optional add-ons binaries using the Online Installer as @aha_1980 suggested a day back.

                J 1 Reply Last reply
                2
                • C ChrisW67

                  @JacobNovitsky said in Building Qt Creator from source:

                  I installed qt creator from apt, but version is much lower then needed how to install fresh qt creator from source?

                  Seriously, don't build Qt Creator and/or Qt from source code if you do not have to. You started this thread failing to build Qt Creator from source, changed to installing the Ubuntu package binaries^^, and then flipped back to building Qt Creator from source (with an unconnected reference to Qt 6.4 libraries built).

                  ^^ While not the latest Qt Creator version it is perfectly able to build Qt projects using any version of Qt 5 or 6 and matching compiler tools you manage to install.

                  Install the prebuilt, easy-to-install current version of Qt Creator, one or more Qt library versions, and optional add-ons binaries using the Online Installer as @aha_1980 suggested a day back.

                  J Offline
                  J Offline
                  JacobNovitsky
                  wrote on last edited by
                  #15

                  @ChrisW67 I would better appreciate answer to my question:
                  should I build source and qt creator separately?
                  I already built all, but I would love to save some time, thats why I'm asking

                  C 1 Reply Last reply
                  0
                  • J JacobNovitsky

                    @ChrisW67 I would better appreciate answer to my question:
                    should I build source and qt creator separately?
                    I already built all, but I would love to save some time, thats why I'm asking

                    C Offline
                    C Offline
                    ChrisW67
                    wrote on last edited by
                    #16

                    @JacobNovitsky said in Building Qt Creator from source:

                    Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:

                    Nothing, the link is broken.

                    Carefully compare what the Readme in the Qt Creator12.0.0 source archive file says:

                    mkdir qtcreator_build
                    cd qtcreator_build
                    
                    cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources
                    cmake --build .
                    

                    with what you say you have typed:

                    cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
                    cmake --build .
                    

                    Ask yourself, "Where are the Qt Creator sources?" Qt Creator is not the Qt Libraries.

                    @JacobNovitsky said in Building Qt Creator from source:

                    should I build source and qt creator separately?

                    What does "build source" mean?

                    I already built all, but I would love to save some time, thats why I'm asking

                    Clearly you have not built Qt Creator from source code or you would not still be asking how to do it. Save some time by building none of it.

                    I do not know how to make this clearer:

                    • Do not build the Qt Creator tool from its source code unless you have a specific reason to do so. A valid reason might be developing changes for Qt Creator itself. A invalid reason would be thinking this was somehow related to the versions of Qt libraries used to build your projects. Install a pre-built Qt Creator IDE and be done with it.
                    • Do not built Qt libraries from source unless, for some specific reason, you must. Valid reasons might include modifying the library itself (bugs or features), building with unusual options or for an unusual target etc. Otherwise, install a pre-built set of Qt library binaries and be done with it.
                    • Build your projects from their source code using any compatible Qt library (installed above) with, or without, using Qt Creator.
                    J 1 Reply Last reply
                    3
                    • C ChrisW67

                      @JacobNovitsky said in Building Qt Creator from source:

                      Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:

                      Nothing, the link is broken.

                      Carefully compare what the Readme in the Qt Creator12.0.0 source archive file says:

                      mkdir qtcreator_build
                      cd qtcreator_build
                      
                      cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources
                      cmake --build .
                      

                      with what you say you have typed:

                      cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
                      cmake --build .
                      

                      Ask yourself, "Where are the Qt Creator sources?" Qt Creator is not the Qt Libraries.

                      @JacobNovitsky said in Building Qt Creator from source:

                      should I build source and qt creator separately?

                      What does "build source" mean?

                      I already built all, but I would love to save some time, thats why I'm asking

                      Clearly you have not built Qt Creator from source code or you would not still be asking how to do it. Save some time by building none of it.

                      I do not know how to make this clearer:

                      • Do not build the Qt Creator tool from its source code unless you have a specific reason to do so. A valid reason might be developing changes for Qt Creator itself. A invalid reason would be thinking this was somehow related to the versions of Qt libraries used to build your projects. Install a pre-built Qt Creator IDE and be done with it.
                      • Do not built Qt libraries from source unless, for some specific reason, you must. Valid reasons might include modifying the library itself (bugs or features), building with unusual options or for an unusual target etc. Otherwise, install a pre-built set of Qt library binaries and be done with it.
                      • Build your projects from their source code using any compatible Qt library (installed above) with, or without, using Qt Creator.
                      J Offline
                      J Offline
                      JacobNovitsky
                      wrote on last edited by JacobNovitsky
                      #17

                      j@j-BOHB-WAX9:/$ find / -type f -name qtcreator 2>/dev/null
                      /home/j/Downloads/qtcreator_build/bin/qtcreator

                      1 Reply Last reply
                      0
                      • J JacobNovitsky referenced this topic on

                      • Login

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