LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-10-2004, 01:23 PM   #1
cj12345
LQ Newbie
 
Registered: Sep 2004
Location: cambridge, england
Distribution: suse, mandrake
Posts: 10

Rep: Reputation: 0
Windows C++ developer tears hair out getting started with kdevelop, gdb, etc


I'm a Windows C++ GUI developer of some 10+ years experience, trying to gett started with porting a large app to Linux. I will be using Qt. I'm new to Linux, and, compared to what I'm used to in the Windows world, getting 'into' kdevelop is very hard.

E.g. how on earth are you supposed to debug any kind of non-trivial application with a debugger with an interface like gdb? To me, this looks like adb. I moved on from that about 15 years ago. Every time I look at the 'user interface' of gdb, even when prettified in kdevelop, I weep. Am I seriously expected to use a tool like this? As far as I'm concerned, MS Visual Studio's integrated debugger is streets ahead.

What I'd like to see is some detailed tutorials showing the development of a rudimentary C++ app (preferably Qt based, but not essential), but one that show all stages of the devt. process including debugging. Now, I realise some of this is just learning curve. Is it me, or is 'real' development under kdevelop as primitive as this? Isnt there any decent visual debugger available or decent tutorials? The kdevelop documentation is minimal.

What development environments do most GUI developers on Linux actually use? I'm wondering whether I should force myself to learn emacs and text-mode gdb. Is this sensible, and if so, where can I find professional-level documentation that will let me learn to use this.

I'd be especially interested to hear from other (ex) Windows developers and how they got started with linux devt. tools.
 
Old 09-10-2004, 03:21 PM   #2
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
Well, I use "ddd" for a GUI front-end to gdb. I like it allot!!!

As for learning kdev', well... I found it no harder (easier actually) then learning any microsoft tools.

There also must be a reson you are an "ex-windows developer".
 
Old 09-10-2004, 08:14 PM   #3
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
Use "kdbg" for debugging (in KDE menu of my FC2 it's called "Debugger", for starting it from the shell just type kdbg).

Last edited by zWaR; 09-10-2004 at 08:17 PM.
 
Old 09-14-2004, 08:02 AM   #4
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Rep: Reputation: 15
Me too!

Hi cj12345,

I am facing *the same thing* - I cannot get the debugger to work, not even on "Hello world", and I am preparing to plow through a huge project I want to add my spice to...

You wrote that the KDevelop gdb GUI is ugly - I cannot even get this to work! No breakpoint is accepted, all I can do is execute the app until "normal termination".

So I would like to ener this thread - maybe it is a solace to you that you are not the only one, but there is no real help I can give.

Did you manage to get the thing running?

Sigh.

Yours, Peter
 
Old 09-14-2004, 09:12 AM   #5
cj12345
LQ Newbie
 
Registered: Sep 2004
Location: cambridge, england
Distribution: suse, mandrake
Posts: 10

Original Poster
Rep: Reputation: 0
My interest in this stems from a project I've been assigned to, which is developing the next version of a non-open- source Windows MFC/C++ app. Its quite large, some 800,000 lines of code. The next version is to be for Windows and Linux. My employer wants this to be single sourced as much as possible. The first question was which gui toolkit to use, and we quickly settled on Qt Enterprise edition (a choice between Qt and wxWindows, but Qt wins because of the support and documentation, cost not being an issue). And its available for the Mac, which might prove handy at some point.

Next question was the devt. tools, compiler etc. As gcc is stable, very well regarded and available for all 3 platforms, this was a no-brainer. The only common devt. 'environment' seems to be emacs+gdb. Learning emacs is not a problem; we've used it before and it clearly is the best editor, if you're prepared to learn it. So we'd settled on this, but were very frustrated when we looked into gdb. Its no doubt powerful, but coming from a visual studio background its a massive learning curve. Microsoft's integrated debugger is, in our view, so much easier to use.

For a while we reverted to developing under vs .net, just for the debugger. But we really did need to settle on the gcc route and revisited the problem and besides we wanted to use a common editing environment. We looked at Kdevelop for the debugger but have now settled on ddd for primary debugging, with emacs for the 'IDE'. ddd looks good enough (I did a hello world test), and because its gdb under the hood, its a friendlier place to learn gdb. There's also a faily detailed ddd manual available. When we get to the point of having to debug Windows specific code etc, we'll either revert to temporarily using vs .net, or use gdb (mingw) with which we'll hopefully be more comfortable with by then.

Ideally I'd like to see a ddd port to work under mingw.

My Kdevelop is 3.0.2 running under KDE 3.2 on SuSe 9.1 Pro 32-bit. It works. I tried installing the Kdevelop 3.1 rpm, but that didnt work - running Kdevelop nothing happened so I gave up on that.

I'm feeling a lot happier about this now I found ddd.
 
Old 09-14-2004, 10:49 AM   #6
unixcoder
LQ Newbie
 
Registered: May 2004
Posts: 12

Rep: Reputation: 0
You can try Magic C++ also. A handy visual remote Unix and Linux C/C++ IDE under windows. You can edit the source codes and debug it handily with this VC++ like IDE :-). It supports CVS and
visual HTML format man page online help also. Server component source code is open to offer support for various UNIX/Linux platform requests.

Magic C++ download site:
http://www.magicunix.com
 
Old 09-15-2004, 06:35 AM   #7
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Rep: Reputation: 15
Hi cj12345,

Thank you for your advice. I'll give ddd a try, and I will share my experiences the next days - wheter there is still some hair left

Regards,

Peter
 
Old 09-17-2004, 06:20 AM   #8
eze
LQ Newbie
 
Registered: Mar 2003
Location: England, UK
Distribution: Gentoo Linux 2006.0 (Acer 1355LC laptop and eMachines 830 desktop) // SuSe 10.0 (Dell P4HT, 1Gb RAM)
Posts: 6

Rep: Reputation: 0
Post Interested

Hi. I've been considering dedicating a serious amount of time and effort into coding in C and C++ for Linux.

Being a Linux user since 1993 (I copied Slackware with Linux kernel 0.99.x in a Tape Backup media ), I always wanted to do hardcore programming on Linux. I develop in C and C++ since 1993, too

I managed to debug and find some problems on a Linux app using ddd (and reporting the bugs to the author), but I always wanted to do everything "the right way" (TM): autoconf, automake, and nothing else. Detecting library versions, adapting to different environments (HP-UX, cygwin, Linux, FreeBSD, etc.) was always something I wanted to learn right.

So I read the autoconf and automake manuals some years ago. It took some time and I managed to create something that compiled and ran. The problem was that I could not believe how much work it took me to do that. I always *wanted* an IDE that worked in an "autoconf+automake" way so I could easily upgrade/downgrade the IDE in the future.

I have the desire to develop some serious apps using Qt and wxWidgets, but I want to be focused on the programming, not in the programming environment.

Is emacs really the best editor for this? Does it have autocompletion? (context-sensitive member autocompletion, for example), what about dynamically "knowing" the type of the variable I'm using when "suggesting" the possible completion values?

I've been glancing at C-Forge (http://www.codeforge.com/), but it costs money (USD 95). Magic C++ is not an option, as I use Linux only for the moment (and I'm happily living in a MS-free world). Is KDevelop right? What about Anjuta? Any others to be considered?

I set up jEdit (http://www.jedit.org/), but it lacks the C++ support I want (even using plugins): it does not have context-sensitive completion in C++, and there are no autoconf+automake handling plugins, neither. It's an ok editor for some things, and for quickly reading code (using the "tags" plugin), but I could not make it more useful for me.

Try to think of an average open source developer who wants to dedicate as much time as possible to coding and thinking, instead of dealing with building tools and stuff like that. Consider that the developer wants to develop the "right way", so everybody can use his program (not only people using the same programming environment).

I'm totally and happily open to suggestions and comments.

Last edited by eze; 09-17-2004 at 06:24 AM.
 
Old 09-17-2004, 07:26 AM   #9
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Rep: Reputation: 15
Hi there,

finally I have set up and ran ddd - well, it is OK for now, at least I have a debugger that works, but the integration is something we (the community) should work on further.

Yes, I am also using the autotools package, they simply rock - my years in the M$ environement poisoned me with certain demands towards an IDE that go beyond what I have seen to be possible with EMACS, gdb and autotools. To be true, initially the Borland IDEs were superior (TurboVision) to the M$ products for a long time, but you know what happened to them.

autotools is absolutely great for integrating code into big projects, especially with intense use of libraries, but they do not really help you very much to generate code completely from the scratch or to understand given code.

Nevertheless, if I look at other OSes installer systems, the autotools simply bring the shine of elegance and brilliance with them. Every "point-and-click-user" can understand quickly how to setup and patch software, even without knowing what a compiler really is. As I said, autotools rock.

I always liked dynamical software development, already "These days (TM)" on PDP11, Cyber or IBM VM/XA: code some lines, watch them execute in the debugger and fix it until it works. I found out that I create much better code this way - instead of browsing through the whole listing and imagine what exception made the funk terminate, you *see* the buffers you use and can imagine if there could occour a overflow condition or not "On the fly".

So the seamless integration of the debugger into the editor/compiler environment is a crucial thing, at least for me.

This is my opinion I wanted to share with you.

So another 2 cent novel from me, hope you did not get bored.

Cheers, Peter

Last edited by PBSchmidt; 09-17-2004 at 07:28 AM.
 
Old 09-17-2004, 07:39 AM   #10
eze
LQ Newbie
 
Registered: Mar 2003
Location: England, UK
Distribution: Gentoo Linux 2006.0 (Acer 1355LC laptop and eMachines 830 desktop) // SuSe 10.0 (Dell P4HT, 1Gb RAM)
Posts: 6

Rep: Reputation: 0
Question emacs could sensible...

Thanks PBSchmidt for your post.

I know autotools are not for understanding other people's code

My intention is to build yet another open source project that gracefully integrates with every possible posix/gnu environment without requiring you to basically reinstall the operating system because of insane dependencies (I've been fighting "dependency hell" for some time now).

I've been looking at several things since my last post. It looks like emacs + Semantic is the answer for the editing part. I've used ddd too, but I still think it has usability barriers to overcome.

Maybe emacs *is* the sensible option for me at this moment. Maybe I should wait until kdevelop or Anjuta are more mature and really interoperate with autotools the way I want them to (I'm not sure about how well these tools cope with that, so I'm sorry if I'm mistaken about that).
 
Old 09-17-2004, 01:17 PM   #11
PBSchmidt
Member
 
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129

Rep: Reputation: 15
Hi eze,

though in an hurry, a line: IMHO, KDevelops fairly well integrated autotools - did you check that already? You get your "Makefile.am" in you newly created project, and may run all the stuff smothly from within the KDevelop UI.

As a matter of fact, I am just in the same situation - consider to start a OS project for as many platforms as I can get. So we may be brothers in arms

Yours, Peter
 
Old 12-06-2004, 08:23 PM   #12
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by unixcoder
You can try Magic C++ also. A handy visual remote Unix and Linux C/C++ IDE under windows. You can edit the source codes and debug it handily with this VC++ like IDE :-). It supports CVS and
visual HTML format man page online help also. Server component source code is open to offer support for various UNIX/Linux platform requests.

Magic C++ download site:
http://www.magicunix.com

Do you realize that this IDE runs on windows right? this uses unix only for the background server
 
Old 12-28-2004, 08:26 AM   #13
SCOSWriter
Member
 
Registered: Dec 2004
Posts: 57

Rep: Reputation: 15
cj12345 I am curious to the outcome of the whole Kdevelop issue. I to am in your position (6yr MS studio developer) having recently been asked to bridge Linux native software between two differnet middlewares, though my job is simple in comparison, due to the heavy use of libs, I have had issues with even make (links with make in a console, not in Kdevelop.) The debugger Kdbg seems ok in comparison to MS studio. Though how local vars and watches are shown is a bit odd. Some locals do even appear. Aditionallly, I'm not sure if watches will take encoded watch vars, for example array[i], or *pointer. I'm interested in what you have learned or know about Kdevelop so far and if your not using it what are you using.

To everyone else following this thread, is there a way to avoid the complexity of the automake and config? I already have makefiles, and since I am working with different middlewares and widly different file structures it seems simpler to avoid these tools. Since our software is highly threaded due to middlewares and such, is it possible to start and debug multiple dependent applications/threads?

Now currently my SuSE 8.2 distribution uses Kdevelop 2.1, far outdated compared to 3... However my system does not want to update it even though it is available. My boss wants me to avoid non rpm/Yast updates to keep our company machines as uniform as possible (he is a little paranoid) How much better is Kdevelop 3? Any suggestions on updating are appreciated.
 
Old 12-29-2004, 12:31 AM   #14
arte-mac
LQ Newbie
 
Registered: Oct 2004
Location: Costa Rica
Posts: 1

Rep: Reputation: 0
I'm very grateful with the links you all provided. I'm still a newbe in programing and Linux, but everyone start from cero so...

Anyway just want to ask two simple questions. How dificult is it to create a program to compose, record and arange music? and did anyone is interested in contributing to it?

This is my first post, Hi to all (I hope someday I contribute to the comunity)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
KDevelop - can't start gdb soichih Linux - Software 15 11-09-2005 10:10 AM
Grrr! Xorg / Nvidia issues again (Tears hair out in clumps) steve_v Linux - Software 1 08-17-2004 02:20 PM
Grrr! Xorg / Nvidia issues again (Tears hair out in clumps) steve_v Linux - Games 1 08-17-2004 01:28 PM
using gdb with kdevelop 3.0 asmith Programming 7 05-16-2004 06:45 AM
kdevelop + gdb Zig Linux - Software 0 09-07-2003 01:49 PM


All times are GMT -5. The time now is 08:03 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration