At 09:14 PM 6/27/02, you wrote: >faisal gillani wrote: > >>hello there i have started using mandrake as one of my >>normal usage O/S but i still cannot make out how to do >>development in c++ for example in my windows i have >>turbo c 3 which i use IDE to develop programs if i want to make a program >>as follows how can i make >>& complie it ? >> >>#include<studio.h> >>#include<conio.h> >> >>void main (void) >>{ >>printf ("Hello world"); >>} >> >>i have installed gcc in my mandrake thanks for reading my mail take care >> >gcc -o <name of source file> <name of executable> > >example: >gcc -o hello.c hello
The "-o" switch is for naming the compiler's output file. Hence the proper command is: gcc -o hello hello.c for compiling a C program. For a C++ program, a typical command would be: gcc -o hello hello.cpp where the extension indicates to the compiler whether the source program is C or C++.
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com