Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-12-2003, 12:49 PM   #1
LQ Newbie
Registered: Mar 2003
Location: India
Posts: 4

Rep: Reputation: 0
Question programmin in Linux.

Hello friends,
I am a newbie in the world of programming..I recently installed RH linux, I just wanted to know ,if anyone at all can tell me how do u compile and link a c program ??? and how would you know the purpose of header files / library files available in linux 7.3??..I will try later versions of linux soon..but I think I should be comfortable with this one first..

Your Sincerely,
Old 04-12-2003, 05:11 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,545

Rep: Reputation: 160Reputation: 160
First make sure you have gcc* packages installed. GCC is the compiler. When you have it, you compile using
gcc -o prog example.c
It will compile 'example.c' and create 'prog' executable.

You don't need most of the headers, they can be used when you develop an application using the program/library. To find out what is a library used for, you usually need to find the library home site and read/download documentation. The codumentation may also be installed somewhere in /usr/share/doc.
Old 04-12-2003, 05:45 PM   #3
LQ Guru
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
if you have gcc and g++ working then you have standar libs for c/c++ if you are going to use non standar libs like mysql lets say refer to their docs they explain prety well
Old 04-12-2003, 07:29 PM   #4
Senior Member
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
basics of linux wireless? slinky2004 Linux - Hardware 4 09-21-2005 02:08 PM
Network Programmin Boffy Programming 1 03-13-2005 11:51 AM
Basics of Linux Security jrdioko Linux - Security 9 07-17-2004 12:58 AM
help with C programmin? john23 Programming 15 11-28-2003 12:50 PM
EXPLOIT programmin darkseed2g3 Linux - Security 7 10-19-2003 09:31 AM

All times are GMT -5. The time now is 03:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration