Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-20-2008, 10:19 AM   #1
LQ Newbie
Registered: May 2008
Posts: 4

Rep: Reputation: 0
how to write a c-program in vector linux

i'm getting started with linux.i've got vector linux with me.i wanna do a c programme in it.i dont know commands to run a c compiler. But i know how to write c-progrms in windows. please help me

Old 05-20-2008, 10:25 AM   #2
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
This is really something you should Google..

Anyway, open up your favorite text editor, write the code, save the file (let's assume you name it myprogram.c), then run..
gcc -omyprogram myprogram.c compile it, and..
to run it.

Consult gcc man pages for more compile options. Or some tutorial.

You could also use some IDE.

Last edited by Maligree; 05-20-2008 at 10:27 AM.
Old 05-20-2008, 10:25 AM   #3
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Rep: Reputation: 17
you write a c programm as you would in windows. except if you want to use system calls. then you need to know the POSIX system calls of course. Win32 API wont do you no good. all you need is a compiler. the command is mostly "cc" (C Compiler) or better "gcc" (Gnu C Compiler). do:
echo $CC
to see what compiler you have



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
how to write a program to record audio in linux using c stephenwalter Programming 3 07-09-2012 07:20 PM
How to write invisible GUI program in Linux with hotkeys to come to foreground? DGMavn Programming 5 04-19-2008 08:09 AM
LXer: Vector Linux 5.9-Pseudo64-0.1 -- Finally, 64-bit Vector LXer Syndicated Linux News 0 09-12-2007 01:20 PM
c++/going through vector ends program aral Programming 4 10-16-2006 12:34 PM
How to write a Vietnamese keyboard program for Linux Namhh Linux - Software 2 10-15-2003 08:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 AM.

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