LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to write a c-program in vector linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-write-a-c-program-in-vector-linux-643528/)

bluewing_linux 05-20-2008 10:19 AM

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

Maligree 05-20-2008 10:25 AM

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.

vadkutya 05-20-2008 10:25 AM

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


All times are GMT -5. The time now is 06:35 PM.