![]() |
doing C
some years ago, in a previous life, I dabbled in C programming on a Sun Unix workstation. Got to the point where I could solve mathematical brain teasers, write "hello whirled" on the screen and sort a file to count all of the 4 letter words etc.
More recently I have been writing C for a PIC microcontroller and didn't find it too steep a learning curve. Anyway, I run Ubuntu10 on my desktop machine and I understand that this was written in C. Also, it would seem likely that there is some C compiler available with my Ubuntu install. I have a simple text editor (gedit) and can write the text. Does anyone know how to inspire the compiler (if there is one buried in Ubuntu) to turn my text into an executable code? Thanks, Rans6... |
I don't do Ubuntu, but I do other *nix/*nux and would assume the answer would be the same....
Have you not discovered gcc/make & friends ? (i.e. already there, under your nose - "whereis/apropos/find make" - unless it's like SuSe which does not always automagically select "compiler tools" category during install :cool:) For more detailed compiler tutorial, see Google "ubuntu hello world c" Good luck, and happy coding ! :ok: |
A standard Ubuntu install usually includes gcc. A good intro to compiling applications from source code is at:
https://help.ubuntu.com/community/CompilingEasyHowTo Of course that article assumes you want to compile source code you obtain from somewhere else, whilst you intend to roll your own! |
You might want to try Eclipse? It's a complete IDE. A pig to use but at least better than the command line.
Eclipse IDE for C/C++ Developers | Eclipse Packages |
I did a basic C / C++ course at university, and compiled some of my programs on this Ubuntu Netbook. The base compiler is called gcc, but I don't think it is installed by default, since it pulls in a bunch of other stuff too. If not, just do a "sudo apt-get install gcc" to install it.
With this code in hello.c: Code:
/* hello.c: display a message on the screen */Code:
gcc -o hello hello.cCode:
./hello |
You might want to try Eclipse? It's a complete IDE. A pig to use at least better than the command line Everybody I know who's tried both reckons Visual Studio to be miles and miles ahead. Sometimes you get what you pay for. |
Originally Posted by Gertrude the Wombat
(Post 5952773)
Too true.
Well, possibly, on a good day. Everybody I know who's tried both reckons Visual Studio to be miles and miles ahead. Sometimes you get what you pay for. The various Visual Studio Express editions are free - but of course not available on Ubuntu etc. |
Well, possibly, on a good day. Everybody I know who's tried both reckons Visual Studio to be miles and miles ahead. Sometimes you get what you pay for. If only googoo would build the ADT for VS - reckon they'd do themselves a favour by opening up a far more competent IDE to a new set of devs. I would pay serious money for an IDE for Android. |
ta everyone, looks like the weekend might give me a break to get stuck in. Fingers crossed.
Rans6.. |
Hi Rans6...
You may need to download the various development tools on Ubuntu, but the Synaptic Package Manager will take care of all that for you. I tend to go into Synaptic then use the Search & look at what's available. Synaptic will install any dependencies as well. The Ubuntu repositories also have a few IDEs available, again downloadable via Synaptic. I see some mention of Eclipse elsewehere, but I'd suggest you take a look at NetBeans which has a number of tutorials on the NetBeans web site. If you are interested in erring towards the Microsoft way, then Mono is also available via Synaptic. Mono, which has its roots in Novell (but MS have a hand in it) is a .NET(-ish) implementation on Linux and includes a C# compiler. Finally there are some good online books around, the "Think like a Computer Scientist" series are around in various places, and Bruce Eckel books include a C one somewhere Anyway, have fun |
Eclipse AND Java - yeuch Never mind, there's someone wanting to pay me to spend Sunday writing C++ with VS ... now is that a :) or :* I wonder ... Wha'ever, if I do some weekend work at least I don't get complained at about how much I spend on flying, for a little while at least. |
IDE? Pshaw! All you need is gedit, g++, and a web browser open to cplusplus.com - The C++ Resources Network. You may as well go straight to the C++ compiler, even if you write plain C and don't hold with that fancy object-orientation stuff. :8
|
| All times are GMT. The time now is 11:46. |
Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.