Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
How to run c program in linux
Name: Moh Date: January 30, 2006 at 20:58:22 Pacific OS: Red Hat Linux 7 CPU/Ram: 2 Ghz
Comment:
How to compile and execute c / c++ program in Red Hat 7.0, help me, i am new to linux, and where can i get help for c/c++ programming using linux
Name: 3Dave Date: January 31, 2006 at 07:02:46 Pacific
Reply:
You probably have gcc installed, very simply: $ gcc infile.c will create an executable called a.out which you can run with: $ ./a.out "man gcc" for more details.
If you are compiling other applications as opposed to your own programs, packages are often compiled by: $ ./configure $ make # make install Always check any README and INSTALL files that might come with it first....
0
Response Number 2
Name: Moh Date: February 1, 2006 at 23:12:11 Pacific
Reply:
Thanks for ur reply Mr.3Dave
But i dont know where can i get gcc, i tried in system tools->terminal. but there it is not working, it is not giving a.out file, also i am able compile using only #gcc command, not using $gcc.
Help me the complete process of working one small c program in RedHat Linux 7.0
0
Response Number 3
Name: 3Dave Date: February 2, 2006 at 04:50:20 Pacific
Reply:
The "$" just indicates a prompt and does not need to be typed in. The "#" indicates a root prompt, to get this type in "su" and enter root's password.
What happens if you just type "gcc" without the quotes? You should get "gcc: no input files". If you get "gcc: command not found" then it is not installed. You should be able to find the rpm for you to install it on one of the installation CDs (usually in the development section if you have one). You could also install it with apt-get/yum and an internet connection.
Summary: i have to run a c program in linux but there's a getche() which i used in c program. how can i get rid of this getche() in order to run the c code in Linux. { /*some code*/ choice=getche(); }while((ch...
Summary: I want a "C" source code file to run audio file in Linux. Just by replacing its path in C file. Once compiled the C File, whenvever the its function is called in an application this soundfile has to p...