LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2006, 09:34 AM   #1
pandorazbox
LQ Newbie
 
Registered: May 2005
Location: Pennsylvania
Distribution: Slackware, SuSE, Fedora Core 3, Lycoris Desktop/LX
Posts: 29

Rep: Reputation: 15
KDevelop/Qt in SuSE 10.0


This little piece is frustrating to me. I've been searching for a little while on this problem, but cannot find a solution. I installed SuSE 10.0, since I have used 9.2 and wanted to see what 10 was like. Installed it, runs good and enjoy it. Previously, I had Slackware 10.2 and loved that. My problem comes in with Qt development with the KDevelop IDE on SuSE 10.0. First, to release some frustration, I hate how I cannot create a simple empty project in KDevelop. I have to choose from a stupid simple hello program that ends up not being simple, as I have to remove files, change project settings, and finally begin coding (RRAAARRR!!!). However, I have a problem with KDevelop and Qt development. If I choose to create a new project, and under C++ choose a Simple Hello Program from the Qmake section, it brings up just a simple hello world .cpp file and some headers. But when I go to compile, I get an error stating that qmake cannot be found in my QTDIR. This is bull crappy as qmake is installed in /usr/lib/qt3/bin/qmake. I double checked to make sure QTDIR was setup, and $QTDIR referenced /usr/lib/qt3, as it should. So, I copied qmake from ~/bin and put it into the $QTDIR, thinking it needed to be in /usr/lib/qt3 instead of /usr/lib/qt3/bin. But, that did nothing. So, I did as the trolltech tutorial said to do. Go to the terminal and type "qmake -project". But that didn't work. So I typed in "$QTDIR/bin/qmake -project" and it seemed to compile a project. I then opened up Kate, placed my code in for a simple window with a label, and saved it as main.cpp. I then did the qmake thing again on main.cpp. I then did "g++ main.cpp" but had some warnings. No errors, but a bunch of warnings. So I tried to run "main", but it didn't run at all. It just passed some errors and said screw you.

So my first question is how do I get KDevelop to recognize qmake? I know it is installed, as it is located in /usr/lib/qt3/bin. Also, how do I set up the shell so I can just type "qmake" instead of "$QTDIR/bin/qmake"? And finally, is there any possible way of setting up an empty Qt project in KDevelop without having to create a whole new project based on a simple hello world program? I find the simple hello world program more work than setting up an empty project. I'm used to Visual Studio 6.0, .NET 2003, and .NET 2005. It seems SO much easier to me than KDevelop. I actually understand VS.

Any help would be appreciated. Thanks!

Mike
 
Old 02-10-2006, 05:29 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
KDevelop doesn't recognize qmake. It just runs 'qmake'. In your case, the error mean that you don't have /usr/lib/qt3/bin in $PATH (then qmake would run correctly). You can have a number of options here:
* add it globally to PATH in /etc/profile
* change KDevelop project settings Project->Project options->Make options, then Add/Copy, fill Name with 'PATH' and Value with '/usr/lib/qt3/bin:$PATH'
The second solution is great when you have more than one version of Qt installed. Then you can switch between them changing just that one option.

I'm not sure what you mean by 'empty project'. Qmake Hello world results in a simple source file plus a directory, KDevelop project file and qmake-related stuff. What would you like to get exactly?
 
Old 02-13-2006, 08:14 PM   #3
pandorazbox
LQ Newbie
 
Registered: May 2005
Location: Pennsylvania
Distribution: Slackware, SuSE, Fedora Core 3, Lycoris Desktop/LX
Posts: 29

Original Poster
Rep: Reputation: 15
Wow, thanks!

Thanks a million for that. It works like a charm. I think I'll do the project settings from now on.

Empty project is just a project file that contains no .cpp files, .h files, .resc files, etc. Just a project file that contains nothing. However, I guess I will have to use the Simple Hello World QMake project and remove the .cpp file contained therein.

I'll have to keep in mind about the project settings. I should've known it could have been a simple KDevelop project setting. Visual Studio does something similar with OpenGL programming. Thanks a million again!


Mike
 
Old 04-17-2006, 08:42 PM   #4
paradox101
Member
 
Registered: Nov 2005
Distribution: SUSE 10.x
Posts: 39

Rep: Reputation: 15
Can someone explain how a newbie can do this in the /etc/profile? I'm not a total newbie, but this one is trivial to me.

Thanks!
 
Old 04-17-2006, 08:53 PM   #5
paradox101
Member
 
Registered: Nov 2005
Distribution: SUSE 10.x
Posts: 39

Rep: Reputation: 15
I tried doing this:

export PATH=/usr/lib64/qt3/bin:$PATH

This was done from inside the bin directory. Qmake still didn't execute/not found.
 
Old 04-19-2006, 05:38 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Such command should work from /etc/profile... What does
echo $PATH
show you later?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using KDevelop for C++ d00bid00b Programming 4 09-20-2005 03:22 PM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
Kdevelop HELP! Phalloides Linux - Software 12 01-20-2005 07:22 PM
Suse 8.0 and KDevelop slovin Linux - Distributions 1 05-01-2002 09:31 AM
Read This if you have SuSE and Kdevelop shassouneh Linux - Newbie 0 03-15-2002 12:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration