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



  • 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.


  • Moderators

    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.



  • 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)


  • Moderators

    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)



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


  • Moderators

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.