Problems with QTCreator and Kdevelop

Started by
10 comments, last by SeaBourne 13 years, 6 months ago
I've been working on learning C++ through some simple RPG game design (I'm not naive enough to plan on an actual game resulting from it at this point). At the risk of giving myself yet another hurdle to clear in my learning process, I've decided to combine my interest in C++ with my desire to become more proficient with Linux.

I thought about changing the subject to, "The Trouble with Linux", as this is the sort of thing that has chased me away from it numerous times in the past. Simply put, I am using openSUSE and installed both Kdevelop and QtCreator, to determine which IDE I might prefer. However, in both cases, my simple "Hello, World" program failed to compile. I get the following error from the compile process in QtCreator:

No valid Qt version set. Set one in Tools/Options
Error while building project EpicDawn
When executing build step 'QMake'
Canceled build.

Naturally, I go to Tools/Options and find that there is, in fact, no Qt version specified. Instead it is specified that the Qt version is automatically detected and is set to "Qt in path". Of course, my first thought was that I merely need to add Qt to the PATH environment variable using the export command. So, I crack open my file system browser (Dolphin in my case) and execute a search for qt. I get several results, but, in adding each to the PATH, I found none helped.

So, here I am, stuck. I can't even get the simplest program to compile. What am I missing here? Any help (and patience with my n00b self) would be much appreciated.
Advertisement
I also started playing around with Linux a while ago (using Kubuntu), and I had similar problems with IDEs. Eventually I found Geany. It is very lightweight in terms of features, but that's what I liked about it and it was very easy to setup and use.

Especially as you're a beginner, I think it's worth a try.
For QtCreator, you have the executables and shared libraries right?

In QtCreator, go to Tools -> Options... -> Qt4 and make sure a version is set (4.7.0 is the latest AFAIK). For me it says Qt in PATH is not found, but I set a version manually.

Then if you have your project opened, go to Projects on the left tab. There's a list of build settings and paths, make sure it's all correct.

Thats what I know, just started with QtCreator as well...
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Quote:Original post by Gage64
I also started playing around with Linux a while ago (using Kubuntu), and I had similar problems with IDEs. Eventually I found Geany. It is very lightweight in terms of features, but that's what I liked about it and it was very easy to setup and use.

Especially as you're a beginner, I think it's worth a try.


Thank you. I will certainly consider that. At this point, however, I'd really like to get up to speed with Qt, as it appears to be more mainstream and offers cross-platform capability.
Quote:Original post by Decrius
For QtCreator, you have the executables and shared libraries right?


Uh...I'm sorry, but I have to admit that I don't know that for sure. It wasn't completely clear to me what I needed to install from the list of packages returned from a YaST search. I selected the package at the top of the list that appeared to most closely indicate what I thought I needed (I can't find a way to view the packages already installed). Now QtCreator runs, but it is very possible that I need to install more packages.

Quote:In QtCreator, go to Tools -> Options... -> Qt4 and make sure a version is set (4.7.0 is the latest AFAIK). For me it says Qt in PATH is not found, but I set a version manually.


The only option in the drop-down list is "Qt in PATH". I am not able to specify a specific version.

Quote:Then if you have your project opened, go to Projects on the left tab. There's a list of build settings and paths, make sure it's all correct.


I see a whole lot of "make not found in the environment" in the project options. I searched my file system for qmake* and all I found was a list of .PNG files.
Hmm, so you _do_ see "Qt in PATH"? Strange. That means it automatically picks the Qt version you installed, I had to click the plus on the right and add one manually.

Perhaps you can still add a version manually, but from your search escapades I dare to think you may not have compiled Qt yet. You should run './configure' and 'make' from the Qt directory then, I suppose... (through console).

Tell me your results. My recent experiences with Qt are quite good. I find it build pretty well, not much features that bother you, good auto-completion, smooth layout and quite easy accessibility.
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Ok, I went back into YaST and went digging for more qt packages. I located 3 or 4 packages that looked like they had to do with C++ core components, so I selected those and installed them. This involved some 60 items being downloaded and installed, including what looked like a few SUSE updates. Much of it is still a bit Greek to me.

At this point I have a QMake path specified in my project options, and I was able to build successfully. However, when I try to run the program, I get the following error:

Failed to start program. Path or permissions wrong?

Any ideas?
I personally use KDevelop4. I honestly don't know what could be the problem to starting the program. Can you try running it from shell instead of from QtCreator. I don't have much experience with QtCreator. Maybe sure you have the following stuff installed.

libqt4-4.7.0-134.1.x86_64.rpm
libqt4-debuginfo-4.7.0-134.1.x86_64.rpm
libqt4-debugsource-4.7.0-134.1.x86_64.rpm
libqt4-devel-4.7.0-134.1.x86_64.rpm
libqt4-devel-debuginfo-4.7.0-134.1.x86_64.rpm
libqt4-devel-doc-4.7.0-136.1.x86_64.rpm
libqt4-devel-doc-debuginfo-4.7.0-136.1.x86_64.rpm
libqt4-devel-doc-debugsource-4.7.0-136.1.x86_64.rpm
libqt4-qt3support-4.7.0-134.1.x86_64.rpm
libqt4-qt3support-debuginfo-4.7.0-134.1.x86_64.rpm
libqt4-sql-4.7.0-134.1.x86_64.rpm
libqt4-sql-debuginfo-4.7.0-134.1.x86_64.rpm
libqt4-sql-sqlite-4.7.0-134.1.x86_64.rpm
libqt4-sql-mysql-4.7.0-136.1.x86_64.rpm
libqt4-x11-4.7.0-134.1.x86_64.rpm
libqt4-x11-debuginfo-4.7.0-134.1.x86_64.rpm
qt4-qtscript-0.1.0-12.4.x86_64.rpm
qt4-qtscript-debuginfo-0.1.0-12.4.x86_64.rpm
qt4-qtscript-doc-0.1.0-12.4.x86_64.rpm
qt4-x11-tools-4.7.0-136.1.x86_64.rpm
qt4-x11-tools-debuginfo-4.7.0-136.1.x86_64.rpm
libQtWebKit4-4.7.0-134.1.x86_64.rpm
libQtWebKit-devel-4.7.0-134.1.x86_64.rpm
libQtWebKit4-debuginfo-4.7.0-134.1.x86_64.rpm

In QtCreator just go to tools->options->qt4. If it's not under auto detected then click rebuild else you'll have to look for it. I don't know where qmake is located but it's usually in /usr/bin/qmake or /usr/local/bin/qmake.

I personally wouldn't bother with geany unless you don't auto completion.
Ok, at this point, after digging through YaST again, grabbing more packages that I *think* look like they *might* be helpful (seriously, having to do so doesn't make any sense - surely there is a better way to set up a development environment), I created a simple test app and, without changing a thing, tried to compile it. I got the following error:

Running build steps for project TestApp...
Configuration unchanged, skipping QMake step.
Canceled build.
Could not find make command: make in the build environment
Error while building project TestApp
When executing build step 'Make'
Canceled build.

Here are my general QtCreator and project options:

Project Options

I really don't know how I'm supposed to determine which packages are necessary to establish a development environment. Perhaps I've been spoiled by Microsoft Visual Studio, which pretty much sets it all up for me. Honestly, if I can't figure this out, I'll probably just wipe it all out and try another distro that allows me to specify during installation that I want QtCreator and the latest C++ compiler installed from the get-go.

Thanks for any help on this.
You are missing "make" application. You will need to search in YaST for that.

This topic is closed to new replies.

Advertisement