View Full Version : KDevelop/Qt in SuSE 10.0

10th February 2006, 18:59
Have a question or two about SuSE 10.0 and KDevelop/Qt 3. After a fresh installation of SuSE 10.0 (which contains KDevelop 3.2 and Qt 3), I tried my luck at creating a Qt-based application. I started up KDevelop, and clicked on 'New Project -> Show All Files -> C++ -> QMake -> Simple Hello World.' The project was brought up as it normally should do in a project workspace. However, when I click 'Build', I get an error stating qmake was not found. So I do a search in the term for qmake, and found it to be at /usr/lib/qt3/bin...which is where I'm assuming it is supposed to be. So I then type '$QTDIR' and it prints '/usr/lib/qt3' on the screen. So, I'm assuming the QTDIR was setup, as it is referencing the same location everyone on the net is saying the QTDIR is supposed to be referenced to. I then open Kate and create 'main.cpp' which is a simple Qt window with a qlabel. I save the file, and open the terminal. I cd into the directory where main.cpp is located, and type 'qmake -project' as was stated in the trolltech documents. However, qmake is an invalid path or file name supposedly. So, I type in '$QTDIR/bin/qmake -project' to see what happens, and it builds a project. I then do '$QTDIR/bin/qmake' as was stated in the trolltech tutorials. Then, I did 'g++ main.cpp' in order to see if my application would build. It builds, but gave me a few warnings. I then ran the executable, but errors went off all over the place, and the program wasn't run.

So my question restated is how can I make KDevelop understand that I actually have qmake installed on the computer? I know qmake is there, and at the bottom of the KDevelop screen, my QTDIR is setup correctly. But it doesn't run qmake at all. It won't even compile the stupid Simple Hello World application under C++ -> QMake -> Simple Hello App.

Also, is there ANY way of getting an empty Qt project in KDevelop? I HATE how KDevelop almost forces you to use an existing project to create an empty Qt project. It's so annoying. Visual Studio has many options to creat empty projects. There are empty projects for .NET, Console apps, MFC, etc. But KDevelop seems to force a project with tons of bloat on you. It takes longer for me to remove those files, fix the project settings, and design/develop than it would if I could just build an empty project.

Any help would be appreciated. Thanks!


Chicken Blood Machine
10th February 2006, 20:42
Try adding $QTDIR/bin to your path before running KDevelop, e.g (in bash):

export PATH=$QTDIR/bin:$PATH

10th February 2006, 22:23
I added the "export PATH=$QTDIR/bin:$PATH" and nothing happened. It is still throwing up errors. The exact error message I am receiving is this:

cd '/home/mlp232/kdevproj/qthelloworld' && QTDIR="/usr/lib/qt3" qmake qthelloworld.pro
/bin/sh: qmake: command not found
*** Exited with status: 127 ***

Any more help?


Chicken Blood Machine
10th February 2006, 22:43
What does 'echo $PATH' give you?

14th February 2006, 03:21
I figured it out. I can set my PATH in the project settings in KDevelop. I just went to my Make Options, did Add/Copy, then in the Name field, I typed 'PATH', then in the 'Value' field, I typed '/usr/lib/qt3/bin:$PATH'. That seems to have solved my problem. My projects actually compile! YAY! This way (by doing the project settings), I am able to install Qt 4 and set my project paths to that directory instead of having to mess wtih /etc/profile. Thanks again!