I’ve received a few queries about how to compile Qt programs in Ubuntu, so I wrote a short tutorial on compiling such a program in Qt.
Qt Logo
First make sure you remove all the qt3 dev tools so that your program isn’t compiled using qt3. It is safe and even recommended to leave the qt3 libraries installed since they may be required for other packages.
$ sudo apt-get remove qt3-dev-tools
Install the qt4 libraries and tools:
$ sudo apt-get install libqt4-core libqt4-gui libqt4-sql
$ sudo apt-get install libqt4-qt3support libqt4-dev qt4-dev-tools
If you’re a developer, you’ll want the gui tools that make development much easier.
$ sudo apt-get install qt4-designer qt4-qtconfig qt4-doc
This will install designer, assistant, and qtconfig.
Now that all the packages are installed, you should be able to compile programs. Many times the program you want to download will reside in a repository (usually CVS or Subversion) so you’ll need to install these packages.
$ sudo apt-get install subversion cvs
Download a program and try it out (or use the program you were having trouble with that caused you to come here).
$ svn co http://svn.jasonandshawnda.com/CulinaryManagement
Compile the program:
$ cd CulinaryManagement
$ qmake
$ make