Q. Installed Qt-4.xxx version on Linux, written a program and then used 'qmake -project' then 'qmake' and finally 'make' to compile the program. But I am getting error, After checking the make file, I came to know that it has been created for qt-3.xxx version. How to get rid from this?
Ans: Qt-3.xxx is the default package, you will get it with linux. And at the time of installing Linux, this Qt-3.xxx also get installed. So now if you installed new version, you have to link it to the library. Please follow the following steps:
1.Please login as a root user
2.Go to bin directory by using $cd /usr/bin and remove the old links
rm –f assistant
rm –f lrelease
rm –f pixeltool
rm –f uic3
rm –f qtdemo
rm –f designer
rm –f lupdate
rm –f qmake
rm –f qt3to4
rm –f rcc
rm –f linguist
rm –f moc
rm –f qtconfig
rm –f uic
Once the old links are removed add new links,
Go to /usr/bin by using $cd /usr/bin and do as follows
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/assistant.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ lrelease.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ pixeltool.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ uic3.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ qtdemo.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ designer.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ lupdate.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ qmake.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ qt3to4.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ rcc.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ linguist.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ moc.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ qtconfig.
$ ln –s /usr/local/Trolltech/Qt-4.xxx/bin/ uic.
Now you can directly use 'qmake ', by default it would be your Qt-4.xxx version.
No comments:
Post a Comment