LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-20-2008, 10:19 AM   #1
bluewing_linux
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


-gowtham
 
Old 05-20-2008, 10:25 AM   #2
Maligree
Member
 
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..
Code:
gcc -omyprogram myprogram.c
..to compile it, and..
Code:
./myprogram
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
vadkutya
Member
 
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:
Code:
echo $CC
to see what compiler you have

vadkutya
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:41 AM.

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