ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.