spin_eight
spin_eight

Reputation: 4025

qmake not found although Qt installed

I created Qt project in MS Visual Studio 2010, I am trying to port it to linux OS. I got Linux, on which Qt 4.6.3 is installed (came with distribution package).

I need to generate the Makefile for my project (project_name.pro), so I try qmake -project and get command not found

As I got Qt installed (executing qtconfig in terminal allows me to know qt version) it quite unevidient & strange for me why having Qt I can't use it's utility qmake?

Could you please offer me some solution of this issue?

Upvotes: 7

Views: 43949

Answers (2)

ILMostro_7
ILMostro_7

Reputation: 1482

Seeing as the Qt3/Qt4 libraries overlap in all the Linux distros I've tried, I thought it might be a good idea to provide a more thorough answer to resolving this issue. If you're running a debian-based distro, the previously-suggested answer to use dpkg might work; however, on other Linux distributions, such as Fedora, for example, that won't quite work.

A more suitable solution, regardless of what distribution you're running, if you have alternatives installed is to do this:

update-alternatives --install /usr/bin/qmake qmake /usr/bin/qmake-qt4 10

Then, for good measure, you can follow that with: update-alternatives --set qmake /usr/bin/qmake-qt4

Upvotes: 6

Piotr Wadas
Piotr Wadas

Reputation: 1884

What distro is that? Probably qmake is in separate package, e.g. in Debian it's qt4-qmake package, also look for some qt-devel, qt4-devel or similar.

pwadas@vao:~$ which qmake
/usr/bin/qmake
pwadas@vao:~$ ls -al /usr/bin/qmake
lrwxrwxrwx 1 root root 23 mar 26  2012 /usr/bin/qmake -> /etc/alternatives/qmake
pwadas@vao:~$ update-alternatives --list qmake
/usr/bin/qmake-qt3
/usr/bin/qmake-qt4
pwadas@vao:~$ dpkg -S /usr/bin/qmake-qt4
qt4-qmake: /usr/bin/qmake-qt4
pwadas@vao:~$ 

Upvotes: 7

Related Questions