Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New to C Programming in Linux

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
GMorgan
LXF regular


Joined: Thu Jan 12, 2006 6:58 pm
Posts: 684
Location: South Wales, UK

PostPosted: Fri Jan 20, 2006 3:47 pm    Post subject: New to C Programming in Linux Reply with quote

Does anyone know a decent online guide to C programming in Linux. Preferably it would contain quirks in comparison to standard C and how to get from a *.c code to a running program (tried messing with GCC to no avail so far), I've been using KDevelop but I can't find an embedded compile/run function so I assume your supposed to run GCC from the command line as included at the bottom. I've tried typing gcc *.c it gives me a file a.out which I'm not sure how to get running.

Have already looked at the Wiki but it only does C++ with no decent reference to C itself.

Cheers.
Back to top
View user's profile Send private message
comcamel
LXF regular


Joined: Thu Apr 07, 2005 6:35 pm
Posts: 205

PostPosted: Fri Jan 20, 2006 4:13 pm    Post subject: Reply with quote

well, even if i haven't given it a go c++ or whatever , look at some simple opensource programs that have a use and you may learn easier how to do stuff, and how to construct things. I am quite good a php now, and i haven't even bought a book or out and only occasionllay looked at tutorials
Back to top
View user's profile Send private message Visit poster's website
GMorgan
LXF regular


Joined: Thu Jan 12, 2006 6:58 pm
Posts: 684
Location: South Wales, UK

PostPosted: Fri Jan 20, 2006 4:19 pm    Post subject: Reply with quote

I know a little about C programming in itself but have been struggling to actual get to the stage where code becomes executable program. No matter what switches I use with GCC nothing workable seems to come out.

Its actually ironic, on Windows I would use the Borland command line compiler and would have 2 command promps and a text editor open because I couldn't afford their IDE. Now in Linux I have a decent IDE but can't get anything to work despite the program all looking pretty. Talk about role reversal.
Back to top
View user's profile Send private message
M-Saunders
LXF regular


Joined: Mon Apr 11, 2005 1:14 pm
Posts: 2893

PostPosted: Fri Jan 20, 2006 4:22 pm    Post subject: Reply with quote

Ultra-quick GCC usage guide:

gcc file.c -o prog

Compiles file.c into 'prog'. Then run with

./prog

M
Back to top
View user's profile Send private message Visit poster's website
GMorgan
LXF regular


Joined: Thu Jan 12, 2006 6:58 pm
Posts: 684
Location: South Wales, UK

PostPosted: Fri Jan 20, 2006 4:24 pm    Post subject: Reply with quote

Cheers, seems to work fine now.
Back to top
View user's profile Send private message
Lejon
LXF regular


Joined: Wed Oct 19, 2005 8:24 pm
Posts: 150
Location: Sweden

PostPosted: Fri Jan 20, 2006 11:40 pm    Post subject: Reply with quote

http://www.advancedlinuxprogramming.com/alp-folder
That is good
_________________
I am the one you thought I was! Just not the way, you expected...
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast