Click to See Complete Forum and Search --> : how to compile?


threadhead
08-17-2002, 10:48 AM
hi!
how do i compile a *.c file name ie monitor.c?
i open it with the editor, write a source code in it but my problem is:
what do i have to enter in the console to compile and run the program written?

thanks bye threadhead

drashkeev
08-17-2002, 11:12 AM
The M that you need to FR is

man gcc

the command is

> gcc -o executablename whatever.c

for c++ it's

> g++ -o executablename whatever.cpp

have fun...

threadhead
08-17-2002, 11:57 AM
when i type:

man gcc linux replies with 'there is no existing manual entry for gcc'

do you know where i can get such entry?

thanks bye threadhead

Dun'kalis
08-17-2002, 12:11 PM
You need to install GCC. What distro are you using?

mingshun
08-17-2002, 12:41 PM
You may like to do a "cc" without quotes too.
cc -- ansi C Compiler driver
gcc -- GNU C Compiler

threadhead
08-17-2002, 04:01 PM
i am using the suse 8.0 professional distribution.

thanks for the help buw how do i install the gcc?
from cd?

X_console
08-17-2002, 05:13 PM
You would install it with rpm: rpm -Uvh filename.rpm

threadhead
08-17-2002, 05:16 PM
ok that sounds good
do you know where i can get this for suse 8.0?

bye threadhead

drashkeev
08-19-2002, 09:51 AM
Read the SuSE manual, the part that talks about installing software with YaST or YaST2. B/c suse has many cd's rpm does not really work.

mrBen
08-19-2002, 10:07 AM
tar -zxvf <filename>
cd /path/to/files
./configure
make
make install


Hold on! It's a proper compiling question. Cool :cool:

:D

threadhead
08-19-2002, 12:26 PM
kinda proper :D
thanks for all the help dudes!

bye threadhead