Saturday, January 23, 2010

Installing Qt SDK 4.6.1 with Qt Creator 1.3.1 on Ubuntu

Now that Qt 4.6.1 SDK and Qt Creator 1.3.1 has been released by Nokia, I need to update my previous tutorial on setting up Qt Mobility development.
  1. Download Qt SDK Development Environment.
  2. Install Qt SDK. Launch Terminal, go to the folder where you downloaded Qt SDK distribution, and run:

    chmod +x qt-sdk-linux-x86-opensource-2010.01.bin
    ./qt-sdk-linux-x86-opensource-2010.01.bin
At the end of installation, you will be presented with this message:
Apart from a C++ compiler, a number of development libraries need to be present to enable Qt Creator to build your Qt applications. On Debian and Ubuntu, use the following command in a terminal to make sure they are installed:
sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-dev
If you're using QtOpenGL, you'll also need OpenGL development files. You can use the following command to find out which packages to install:
sudo apt-get install libgl-dev libglu-dev
So just do what it tells you to:
sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-dev
sudo apt-get install libgl-dev libglu-dev
Make sure you add Qt bin folder to your PATH environment. Edit $HOME/.profile and add:
export PATH=/opt/qtsdk-2010.01/qt/bin/:$PATH 
Now you can build and run Qt applications.
To build Qt Mobility apps, continue to Installing Qt Mobility libraries.

1 comment:

Be the first to comment!