Getting started with C++ and Linux.

For stuff that really doesn't have ANYTHING to do with Puppy
Post Reply
Message
Author
User avatar
Boo2themoon
Posts: 54
Joined: Wed 15 Aug 2007, 20:50
Location: West Country UK

Getting started with C++ and Linux.

#1 Post by Boo2themoon »

Hi all,

A friend of mine who has been away from computers generally and programming specifically for about 15 yrs, has decided to start over.

He has got himself a 3yr old (guessing) messed up XP machine that needs more than a spring clean. So he has asked me to help him get started with Linux and C++ tools.

Whilst I can help him get up and running with Linux, I know sweet FA about programming and the tools required.
A quick Google threw up more options than you can shake a stick at! IDE's, Emac, compilers and debuggers etc... Is all this necessary?

So if anyone is kind enough to reply, my questions are:

What distro would make a good base?... Puppy?
What tools (names) would you suggest?

Or is this a bit like asking "whats the best colour?"

Many thanks.

Boo

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

Re: Getting started with C++ and Linux.

#2 Post by SirDuncan »

Boo2themoon wrote:Or is this a bit like asking "whats the best colour?"
That would be a fair description. Still, there are some basics that everyone will agree upon.

The best compiler is G++, which is part of the GNU Compiler Collection. Most distros come with this by default, in Puppy you have to add the appropriate devx module for your Puppy version.

The next thing you need is an IDE/code editor. I prefer Geany, which is available in Puppy (preinstalled in most versions). My professors swear by emacs, but the only thing (in my opinion) it does nicer than Geany is debugger integration. Many others swear by Vim. Both emacs and Vim have a steep learning curve to make them truly useful. I have heard great things about Anjuta, but I cannot get it working under Puppy (yet . . .), it has quite a few Gnome dependencies.

Once you have those two, you need either a book or an internet connection to learn the language. That's it.

To boil it down, the IDE and distro are matters of preference, but the compiler you want is G++. G++ will come with, or at least be available with any distro you choose.
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Work with the creating of a graphics orientated C compiler for Puppy
http://www.murga-linux.com/puppy/viewto ... 280#186280
Hope that might interest your friend :)

It also works with Windows so a bit of familiarity is also possible to start

With open source you can get right in with the developers
This is the way to learn as you know. Hopefully you can help out your friend too ;)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Boo2themoon
Posts: 54
Joined: Wed 15 Aug 2007, 20:50
Location: West Country UK

#4 Post by Boo2themoon »

Thanks for the info guys.
To boil it down, the IDE and distro are matters of preference, but the compiler you want is G++. G++ will come with, or at least be available with any distro you choose.
A nice and simple answer, thanks. But one question, does the IDE provide a debugging function?
Work with the creating of a graphics orientated C compiler for Puppy
http://www.murga-linux.com/puppy/viewto ... 280#186280
Hope that might interest your friend
Thanks for this also, I'll be sure to pass it on.
Its all a bit beyond me I'm afraid :shock:

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

#5 Post by SirDuncan »

Boo2themoon wrote:A nice and simple answer, thanks. But one question, does the IDE provide a debugging function?
No, the GNU Compiler Collection does. IDEs usually interface with the GNU debugger. Unfortunately, Geany does not interface with it, at least not yet. Maybe a future version will. You can still run the debugger, it just doesn't show you your code and the debugger output in the same window. Emacs integrates with the debugger quite nicely.
Lobster wrote:Work with the creating of a graphics orientated C compiler for Puppy
http://www.murga-linux.com/puppy/viewto ... 280#186280
Hope that might interest your friend
No offense to the fine crustacean, but you should always learn the ANSI standard (or whatever standard your language uses) before you start messing with oddball derivatives. I suggest that your friend start with either C or C++. You don't need a fancy graphics oriented language to write a Hello World program. Then if he/she likes, it's easy to move on to eCere or to learn how to make calls to SDL or GTK for graphics.
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

User avatar
Boo2themoon
Posts: 54
Joined: Wed 15 Aug 2007, 20:50
Location: West Country UK

#6 Post by Boo2themoon »

Sir Duncan,

Thanks again for your speedy, informative and clear reply.

From what I now understand, it seems that Puppy+Devx does indeed cover his initial requirements and would certainly be a painless way to get started with Linux.

But as these things do, it leads me on to asking a couple more questions:
Is there an advantageous method of installation ie Live vs frugal vs full install?
And is there a particularly suitable base Pup ie 2.xx vs 3.xx.

Thanks for your time and help with this.

Boo

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

#7 Post by SirDuncan »

Boo2themoon wrote: Is there an advantageous method of installation ie Live vs frugal vs full install?
A full HD install is right out, because you can't load squash files that way (devx is a squash file), you would have to manually extract it. That's kind of a pain. I use a frugal install, although a live CD with a save file on the HD (or a flash drive) would probably work just as well.
With any type of install where you have a save file, just copy the devx module to the same directory as the save file, tell Puppy to load it with the boot manager, and reboot.
Boo2themoon wrote:And is there a particularly suitable base Pup ie 2.xx vs 3.xx.
Not really. Whatever Pup works best on the machine he will be using is what you should set him up with.
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

User avatar
tronkel
Posts: 1116
Joined: Fri 30 Sep 2005, 11:27
Location: Vienna Austria
Contact:

#8 Post by tronkel »

@boo2themoon

More info here in this thread about getting started with C++

http://www.murga-linux.com/puppy/viewto ... 288#186288
Life is too short to spend it in front of a computer

User avatar
Boo2themoon
Posts: 54
Joined: Wed 15 Aug 2007, 20:50
Location: West Country UK

#9 Post by Boo2themoon »

Sir Duncan,

I think I'm now armed with enough info to help the guy out. Thanks.

My only problem now is that I have become interested myself!
But as Linux its self has become a hobby, if I started to learn programming as well, then I think my Lady would "up sticks" and leave me with the kids! Doesn't bare thinking about...well the kids anyway. :shock:

But I would like to learn how to package apps up for Puppy, but that's another story....

@ tronkel
Thanks for the link, some good info and reference recommendations there.
All the best with the Chihuahua project.

Many thanks to all,

Boo

Post Reply