Guide to developing software on Kubuntu with KDevelop
One of the main reasons that I chose kubuntu over the more popular Ubuntu was the KDE base that it was built on. I had heard good things about development on Kde; and I wanted to try my hand at it. KDE, in my opinion, has one of the best free IDE available for it: KDevelop. KDevelop allows you to easily develop and deploy KDE applications. I was very surprised to see that KDevelop was not installed in the base Kubuntu 6.06 Dapper Drake install that I had done. But the beauty of Kubuntu (or Ubuntu) for that matter is that the software installation method is much more refined than in the past. For Kubuntu; I was able to use Adept (package manager) to download the KDevelop package. But to my dismay, just downloading the KDevelop package was not enough. There were other key development libraries/tools that were missing. I decided to document the steps that I followed to get to a stage where I could compile and run a simple KDE application.
Below is a list of packages that you will have to download. The order listed is the order that I downloaded them in. I suggest that you do the same. All of these packages were available in the Adept package manager. Just type in the names as listed below and install away. One nice thing to note is that during the whole install process; not even one restart was required. Windows can learn a little something from this. On to the list!
- kdevelop3
- kdevelop3-data
- kdevelop3-dev
- kdevelop3-doc
- kdevelop3-plugins
- make
- automake 1.9
- gcc-3.3
- g++-3.3
- libc6-dev
- kdebase-dev
Now that you have installed the required packages; we need to do some cleanup. My Kubuntu installation came with ‘automake 1.6′ install. So I used Adept to remove that package since we just installed automake v1.9 listed above. The second thing that I had to do was change the executable for gcc and g++. The versions we installed are called ‘gcc-3.3′ and ‘g++-3.3′. The problem is that KDevelop is looking for ‘gcc’ and ‘g++’. I fixed the problem by just creating a ’sym link’ in my /usr/bin directory. Think of a ’sym link’ as a ’shortcut’ in Windows. The commands to do that are listed below.
sudo ln -sf /usr/bin/gcc-3.3 /usr/bin/gcc
sudo ln -sf /usr/bin/g++-3.3 /usr/bin/g++
Now you are done! You can go ahead and attempt to build your first KDevelop App. Launch ‘KDevelop: KDE/C++ (IDE for KDE development)’ from the Development menu that is in your ‘K menu’. Once KDevelop launches; create a ‘New Project’ and build a ’simple KDE app’. Use this image as a guide on which entry to choose.
Run through the new project wizard and you will have a bare bone KDE project. From the build menu; choose ‘Run automake and friends’. After this is successfull; run ‘Build->Run Configure’. Now your project is ready to ‘Build’. Choose ‘Build->Build Project’ and then you can execute it by doing ‘Build->Execute Program’. Congrats! You have just built your first KDE application.
I hope this guide was helpful for you. Please digg this story so others can find it. If you run into any problems; please post them here because they might be similar to what I have already seen. I might be able to help; since I ran into a lot of problems while I was setting up my system for development.
Please digg this guide if you found it useful so others can see it.
KDevelop is indeed and excellent IDE
Did you know you can install and use it in Ubuntu and not just in Kubuntu? Synaptic will install all the kde base libraries needed. Install ‘build-essential’ too for the compiler and support and it all just works
Having never tried Ubuntu; I did not realize that. But if what you say is true; then thats great news!
[...] A guide that shows you how to start developing on Kubuntu using KDevelop. I go through all the packages that you need to install in order to compile and run your first KDE application.read more | digg story [...]
Does Kdevelope also do VB .NET programming ?
Look at the Mono Project for that..
wonderfull explanation for kdevelop
as i missed it too on
kubuntu the wonderlinux
[...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]
i`m having a little trouble with kdevelop under kubuntu 6.06, my install cd came with automake 1.4, so i did some sudo install automake1.9, and when i try to compile anything, i get `kde needs automake 1.6 or newer`, i tryied to remove the automake1.4, but it continues telling me that i`m wrong.
what do i do?
Hi. I had the same problem. What you need to do is to remove the ‘automake 1.4′. What kind of error do you get when you tried to remove it? I was able to remove it using the ‘Adept’ package manager.
On the ‘New Project’ dialog I only have the option for a Custom license. Does anyone else have this problem? I’m wondering if it is something I did wrong, or if there is a problem in the kubuntu packages.
It seems that kdevelop is looking in the wrong location for the license templates. Creating a symlink fixes the problem.
sudo ln -s /usr/share/apps/kdevelop3 /usr/share/apps/kdevelop
I installed KDevelop through Synaptic. Since I don’t have KDE, I had to tell Synaptic to install all suggested and recommended packages (quite a few megs to download, be warned).
Also, for the automake version issue, you have to call “update-alternatives –config automake” and choose the latest version that you got.
This is all I had to do to have KDevelop full working (as far as I could test).
I don’t like KDE, but KDevelop seems to be one of the best full-featured IDEs, and includes a GUI desinger as a bonus. Very good for those who just came from M$ and Boreland IDEs. I also recommend Codeblocks, which I didn’t test but heard a lot of positive things about.
Hi, this looks helpful. I have a brand new instalation. In adept I type kdevelop3 and it is not found as installed. Unfortunately adept will not go and get it. How do I get the right repository into adept? Or where do we enter the network proxy so it can get out of the university network?
Thanks for the help Navdeep. You really helped me out!!
I did as you suggested and everything seemed to work well.
While the program executed I did get the following errors:
./simple
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 148
Minor opcode: 3
Resource id: 0×0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 148
Minor opcode: 3
Resource id: 0×0
Failed to open device
simple: WARNING: KXMLGUIClient::setXMLFile: cannot find .rc file simpleui.r
I have installed both Ubuntu and Kubuntu on VMWare (running on XP) to compare the two before I embark on some development. I want to use the KDevelop IDE.
I have everything working on Ubuntu, but Kubuntu is giving me problems. Firstly, there is no mention of KDevelop in Add/Remove Programs unless I select ‘Any suite’, in which case the packages appear but are greyed out, so I cannot select them.
Also, if I try a ’sudo apt-get install kdevelop3′ from the command-line, it tells me that it couldn’t find the package.
I am using the latest Kubuntu desktop installation, v6.10. Should I of installed the server version instead?
well i have the same problem of the greyed out.. the first thing is my network settings weren’t working, but once i fixed that.. still greyed out though..
im a major newbie to kubuntu - but i got it installed by using adept to get synaptic packaage manager, and then using synaptic to install it - you may need to add a resouurce depositry listed on the kubuntu 3.5.6 download list
Navdeep,
Great instructions! Everything went smoothly. The only thing short of perfect is the lack of man page documentation for Perl. Most of the other languages like Python and Ruby work fine, but when I try to access man pages for Perl in the “Documentation” tab of KDevelop, I get the following error:
KDE Man Viewer Error
No man page matching to perlunicode found.
Check that you have not mistyped the name of the page that you want. Be careful that you must take care about upper case and lower case characters! If everything looks correct, then perhaps you need to set a better search path for man pages, be it by the environment variable MANPATH or a matching file in the directory /etc .
Any suggestions for a newbie?
Thanks for your help navdeep, it’s really usefull to kubuntu newbies like me.
BTW, same error here jimbo. I’m under kubuntu 6.found a Have you found a way to fix it?
cheers,
Baptiste
edit : kubuntu 6.10
In ubuntu fiesty, libtool must be installed in addition to the other libraries for this solution to work. If libtool is not installed, it is likely that a bunch of badness will happen (Such as: When creating a new project, configure will fail…).
hi!
Thanks for the instructions, it’s working for me….
Thx again!!!
bye