Overclockers Australia Forums

OCAU News - Wiki - PC Database - QuickLinks - Job Search - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Software Topics > Programming and Software Development


Sign up for a free OCAU account and this ad will go away!
Reply
 
Thread Tools
Old 3rd November 2009, 3:55 PM   #1
dohzer Thread Starter
Member
 
dohzer's Avatar
 
Join Date: Jan 2002
Location: Melbourne
Posts: 4,194
Default Programming in Ubuntu

I recently installed Ubuntu and was expecting it to come with a c/c++ development environment, but can't see one installed.

I'm new to Linus, and I want to be able to do some basic c and c++ programming, maybe some GUI stuff and communication via serial port and ethernet, so can anyone suggest a good environment/compiler to use?
dohzer is offline   Reply With Quote
Old 3rd November 2009, 4:07 PM   #2
The Sentinel
Member
 
The Sentinel's Avatar
 
Join Date: Jan 2002
Location: The Cocos Islands
Posts: 2,090
Default

You;ll neet to install the C and C++ compilers as well as automake (amongst other things) if they weren't selected when you installed Ubuntu.

apt-get install <package name>
__________________
Listing computer details in your signature is like describing your genitals to complete strangers on the street.
The Sentinel is offline   Reply With Quote
Old 3rd November 2009, 4:09 PM   #3
GumbyNoTalent
Member
 
GumbyNoTalent's Avatar
 
Join Date: Jan 2003
Location: Briz Vegas
Posts: 2,013
Default

google the following

GCC
GTK+
Gnome
__________________
Q6600 @ 3.6GHz Scythe Ninja | Gigabyte GA-EP43-DS3R | 4GB PNY 6400 @ 1000Mhz| Zotac GTX275
GumbyNoTalent is offline   Reply With Quote
Old 3rd November 2009, 4:23 PM   #4
Goth
They're in the kernel!
 
Goth's Avatar
 
Join Date: Jun 2002
Location: Melbourne
Posts: 7,721
Default

If you only want to do basic C programming, all you'll need is gcc, as well as your favourite text editor, eg. vim, which of course should already be installed.

If you're familiar with those tools and want to use them, you may want to make sure that make is installed as well as the debuggers such as gdb or ddd, and your favourite revision control system such as subversion (svn), git, cvs etc, although you don't need any of these things installed if you're just starting out with programming in a Linux/Unix environment.

Of course many of the things I have already mentioned are probably already installed.

I don't know anything about GUI programming personally, everything I program runs within the shell.
__________________
"How is anyone supposed to know that this isn't just a bunch of crap?" - Richard Feynman.
Goth is offline   Reply With Quote
Old 3rd November 2009, 4:31 PM   #5
dohzer Thread Starter
Member
 
dohzer's Avatar
 
Join Date: Jan 2002
Location: Melbourne
Posts: 4,194
Default

I didn't actually see any options when I installed Ubuntu. I set up my partitions and followed the instructions... perhaps there was an "advanced user option" that I didn't see.

I've used GCC when programming Atmel microcontrollers.
dohzer is offline   Reply With Quote
Old 3rd November 2009, 4:39 PM   #6
deepspring
Member
 
deepspring's Avatar
 
Join Date: Jul 2002
Location: Rutherford, NSW
Posts: 2,446
Default

Code:
sudo apt-get install build-essential
Running that should get you started. If you want a C/C++ IDE to use, Anjuta is a safe place to start.

Code:
sudo apt-get install anjuta
If you want to program Atmel chips, open Synaptic package manager and search for 'AVR' without the quotes. You should get presented with the GCC-AVR package and a number of other helpful packages like avrdude, etc.
__________________
~::DEEPSPRING::~
anti-deity, superstar

Last edited by deepspring; 3rd November 2009 at 4:42 PM.
deepspring is offline   Reply With Quote
Old 4th November 2009, 1:46 AM   #7
dohzer Thread Starter
Member
 
dohzer's Avatar
 
Join Date: Jan 2002
Location: Melbourne
Posts: 4,194
Default

I just installed "build-essential" using that apt-get command, and used the "Ubuntu Software Center" to install Anjuta.

Linux noob questions:
What exactly is "build-essential"? How do I know where it is installed?
How do I even know if it has been installed (say if I forget about it later and want to know if I have installed it)?
How do I know if "make" is installed? When I type "make" into the terminal, I get the below response, which I assume means that it is installed.

Code:
make: *** No targets specified and no makefile found.  Stop.
Is there a comprehensive list of software that can be installed using apt-get?

I remember using KDevelop at uni to do some basic programming. Is it any good?
dohzer is offline   Reply With Quote
Old 4th November 2009, 2:03 AM   #8
HeatVision
Member
 
Join Date: Nov 2006
Posts: 294
Default

Yes, make is installed. You can verify this by running the program itself:
Code:
make -v
Or by looking for the executable:
Code:
which make
Or by checking your package manager:
Code:
dpkg -l make
To get a list of all available software:
Code:
dpkg --list
Or of course you can use a graphical program like synaptic or aptitude or dselect.
HeatVision is offline   Reply With Quote
Old 4th November 2009, 5:02 AM   #9
deepspring
Member
 
deepspring's Avatar
 
Join Date: Jul 2002
Location: Rutherford, NSW
Posts: 2,446
Default

build-essential is just a package mask that automatically installs all the standard GNU C/C++ compilers, development libraries, headers, and various utilities needed to write C/C++ programs in Ubuntu/Debian linux without having to manually install them individually.

Extra development packages (kernel, ncurses, GTK, SDL, Oyster, Boost, etc) can be manually installed via the Synaptic Package Manager (I think it is located: System > Administration > Synaptic Package Manager). You shouldn't need any of these if you are writing simple console based C/C++ programs. If you want to write Gnome applications, you need to install GLADE and the relevant Gnome development packages.

KDevelop is a very good IDE. However, it is targeted at KDE desktop environment development more than anything. If you want to use it, you can install it like so:
Code:
sudo apt-get install kdevelop
__________________
~::DEEPSPRING::~
anti-deity, superstar

Last edited by deepspring; 4th November 2009 at 5:11 AM.
deepspring is offline   Reply With Quote
Old 4th November 2009, 9:11 AM   #10
toXin
New Member
 
toXin's Avatar
 
Join Date: Sep 2009
Location: Sydney
Posts: 102
Default

imo you should be asking this question in the forum dedicated to the distro, You will get fast and reliable answers there.

Not saying you won't here, Just saying it will probably be more efficient.

I used to work with linux a bit and whenever I had questions I would just ask the forum dedicated to the distro I was using. Theres at least a few guru's for each distro and that's where they will probably be.
__________________
||Q9550 @ 3.4||TT Blue orb II-Temporary||4x2GB XMS2 DDR2 800||EP45-DS3R||HD4870 1GB XpertVision||Lancool A-64
toXin is offline   Reply With Quote
Old 4th November 2009, 9:40 AM   #11
Dogo
Member
 
Dogo's Avatar
 
Join Date: Jul 2005
Location: Melb
Posts: 145
Default

For linux I recommend the Eclipse IDE, with the CDT (C/C++ Development Tools) extension
Dogo is offline   Reply With Quote
Old 4th November 2009, 9:43 AM   #12
shift
Member
 
shift's Avatar
 
Join Date: Jul 2001
Location: Hillcrest, Logan
Posts: 1,676
Default

Quote:
Originally Posted by HeatVision View Post
To get a list of all available software:
Code:
dpkg --list
Isn't that a list of what's installed, not what's available?
__________________
"Loyalty to the country always. Loyalty to the government when it deserves it." -Mark Twain

"Say what you want and be who you are because those who mind don't matter and those who matter don't mind." -Dr. Seuss
shift is offline   Reply With Quote
Old 4th November 2009, 6:09 PM   #13
HeatVision
Member
 
Join Date: Nov 2006
Posts: 294
Default

Quote:
Originally Posted by shift View Post
Isn't that a list of what's installed, not what's available?
Ooops, my bad, should be
Quote:
dpkg --list '*'
HeatVision is offline   Reply With Quote
Old 5th November 2009, 8:53 PM   #14
xsive
Member
 
xsive's Avatar
 
Join Date: Jun 2001
Location: Canberra
Posts: 3,445
Default

Quote:
Originally Posted by Dogo View Post
For linux I recommend the Eclipse IDE, with the CDT (C/C++ Development Tools) extension

Gah! What a monster!
vim + exuberant ctags = win.
__________________
SETI 10,000 Club
TEAM GREEN OCAU

Got Slack?
xsive is offline   Reply With Quote
Old 5th November 2009, 10:39 PM   #15
Mikos
Member
 
Mikos's Avatar
 
Join Date: Mar 2004
Location: Cydonia
Posts: 587
Default

I think I'd have a heart attack if I had to code from command line again.

IDEs all the way!
Mikos is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

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 On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 5:01 AM.


eXTReMe Tracker
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. - This page served to you by: surf
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!