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. How to install QT properly so its libraries and commands are found
Qt 6.11 is out! See what's new in the release blog

How to install QT properly so its libraries and commands are found

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 2.4k 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.
  • I Offline
    I Offline
    ich__
    wrote on last edited by
    #1

    I installed qt4 (developer mode) on Xubuntu using the "synaptic package manager". When I try to compile a c++ program "qt.h file is not found" (called by #include "qt.h"). If this should be a problem only because the code was written for q3, I also tried #include <QEvent> (part of qt4). This produced the same error while compiling, as not found. Also the command qt3to4 (to port code from qt3 to qt4) is not found). What else do I have to set in PATH or elsewhere in order that the packages and commands are found? The simple installation seemed not enough.

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

      Many distributions choose to split Qt into many parts. Try searching for other Qt packages (qt-tools, qt-sdk, etc. the names differ between distros).

      Or, if you want to be in full control, uninstall the package from your distro and install the binary installer downloaded from Qt Project.

      (Z(:^

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ich__
        wrote on last edited by
        #3

        I installed qt-sdk in addition. some -tools are installed. But this doesn't help me. when compiling, the files are still not found and also qt3to4 is not found. If I install from the website. which package to I need?
        For the compiling, the makefile also needs QTDIR to be defined. Maybe at this stage something went wrong or the makefile doesn't fit to qt4? (The code was all written for qt3)

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

          Hm, usually qmake handles everything nicely, without the need for QTDIR to be defined. But since your project is based on Qt3, it may have some additional problems ;-) I am not very familiar with Qt3 to 4 porting, but I have heard it is painful. The transition from Qt 4 to 5 is much, much easier.

          You can download this link ("Qt 4.8.6 for Linux":http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz)

          (Z(:^

          1 Reply Last reply
          0
          • I Offline
            I Offline
            ich__
            wrote on last edited by
            #5

            If I install it this way, how can I again uninstall it?

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

              The binary package includes an uninstaller, if I recall correctly.

              (Z(:^

              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