Kerry
Posts: 1
Joined: Sat Sep 08, 2012 1:43 pm

Where do I start

Wed Sep 19, 2012 4:10 pm

hello I know c/c++ but I do not know linux and how to program in that os could someone point me to where I can get started

thanks
kerry jarrell

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Where do I start

Wed Sep 19, 2012 4:22 pm

My Pi should arrive today finally been checking into this site for python

Mostly search for beginning tutorials and such is the best to start as what is good for me might not work for you but I would love to see what others suggest so many sites to choose from

http://wiki.python.org/moin/BeginnersGuide

Here's one for very basic linux learning it walks you through the basics of command navigation

http://linuxsurvival.com/

Not sure if these are too basic for you but I hope it helps
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Where do I start

Wed Sep 19, 2012 7:46 pm

On the Pi you won't have a big fancy IDE or RAD tool , you might want to work
from the commandline.

gcc is the C compiler , g++ is the C++ counterpart.

So

Code: Select all

gcc  mysource.c -o myprogram
chmod +x myprogram
./myprogram
is the easiest way to get started.

If you want to do bigger projects , have a look into so-called "Makefiles"

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

iso9660
Posts: 25
Joined: Sun Sep 16, 2012 1:48 pm

Re: Where do I start

Thu Sep 20, 2012 5:59 pm

I highly recommend you to develop in Code::Blocks C/C++ IDE. It's very friendly. You can develop console applications, windowed applications (you have an integrated window designer), etc. It has very handy features like code completion and integrated debugging.
Also you can find some easy c code examples in /opt/vc/src/

To install codeblocks:
sudo apt-get install codeblocks g++ libwxgtk2.8-dev libwxgtk2.8-dbg

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Where do I start

Fri Sep 21, 2012 7:28 am

Also try Geany, it is a simplified IDE that's low on resource use.

I think the command to get it is:-

Code: Select all

sudo apt-get install geany
It runs from the LXDE desktop and you will see it in the menu under Programming. Piece of cake to use.. Just remember when typing that first "hello world" program to use the "Build" menu option. If you do "Compile" it won't link, so no executable will be produced.

Having said that, I think I will also give CodeBlocks a try...

jimjimjim
Posts: 6
Joined: Fri Sep 21, 2012 7:11 pm

Re: Where do I start

Sun Sep 23, 2012 8:10 am

I like a text editor with gcc in a terminal combo. Am searching for a lightweight text editor for pi with syntax highlighting. On other computers I use gedit to do this, but it is rather a large install I want to avoid if possible. If you find any lightweight text editors that suit this use please let me know.

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Where do I start

Sun Sep 23, 2012 9:30 am

I would have said "terminal + shell + vi + gcc + make", but it might be a little intimidating for a beginner.

That said, it is my toolchain of choice because, as a professional developer working on different sites I can't be sure a particular IDE will be available, so I keep competent with the basics.

User avatar
tedhale
Posts: 114
Joined: Thu Sep 20, 2012 4:52 pm
Location: Williamsburg, VA, USA
Contact: Website

Re: Where do I start

Mon Sep 24, 2012 2:37 pm

I agree with Jon B, and that is close to what I do. Rather than vi, I use an IDE on my windows system and edit the files via a Samba shared drive. Then I use SSH to get to the command line and then make.

If you ignore vi and use a simpler editor, then the only thing left that is intimidating is the make file. For most simple programs they are trivial.

Another option is the Eclipse IDE, but I'm not sure if it is available for the Raspberry Pi yet, and it is such a complex program, I doubt that it would perform very well when run on the Pi. You can run it on another platform (I do Android development on my Windows system using Eclipse) but there can be difficulties setting up the proper tool chain to compile for the Pi.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com

adamski69
Posts: 11
Joined: Tue Jul 24, 2012 9:29 pm

Re: Where do I start

Wed Oct 10, 2012 4:47 pm

There's a good programming in C with the Geany IDE setup guide here
http://www.raspberry-projects.com/pi/pr ... rogramming

Return to “C/C++”