![]() |
| | #1 |
| Registered User Join Date: Jun 2002
Posts: 6
| Thanks, Bud |
| Bud is offline | |
| | #2 |
| Guest
Posts: n/a
| Try whereis gcc. If it returns /usr/bin/gcc, it's installed. Otherwise search your Red Hat cdroms; mkdir /cdrom; mount -t cd9660 /dev/cdrom /cdrom && find /cdrom -name "*gcc*" Code: cat > foo.c
#include <stdio.h>
int main()
{
puts( "hello world!" );
return 0;
}^D
gcc foo.c -o foo && ./foo
|
|
| | #3 |
| Registered User Join Date: Sep 2001 Location: Australia
Posts: 212
| you should do if you installed it on setup. to test you do type which gcc this will tell you if you have it, if you do it'll tell where it is installed. To use it you have to be in konsole, when you are there you can use it from any directory. Simply type gcc -Wall filename -o program-Name "-Wall" turns all warnings on "-o program-Name" program-Name becomes the executable "filename" can be a list of C files if you don't use -o option, then it compiles the program to the default "a.out" to run the program type: ./program the dot-slash specifies the program is in the current directory hope this helps kwigibo |
| kwigibo is offline | |
| | #4 |
| Just because Join Date: Jan 2002
Posts: 2,502
| redhat does bundle gcc with it. as a matter of fact, it changed gcc 2.95.3 and renamed it 2.96RH. |
| ygfperson is offline | |
| | #5 |
| In The Light Join Date: Oct 2001
Posts: 598
| howdy, you might try this. open a new file in emacs name it hello.cpp code the "hello world" thing go to the "tools" menu and select "Compile" then open a terminal window and (like sugested before) type ./hello. if this works your on your way. on my RH 7.2 install the compiler defaults to gcc 2.96 and has all of the libraries pathed in corectly. M.R.
__________________ I don't like you very much. Please post a lot less. Cheez *and then* No, I know you were joking. My point still stands. |
| itld is offline | |
| | #6 |
| Just because Join Date: Jan 2002
Posts: 2,502
| that may not always work. on my emacs the compiler is not pre-determined. just run "gcc -v" at the command prompt and it should tell you something about gcc (or the fact that it doesn't exist.) |
| ygfperson is offline | |
| | #7 |
| Registered User Join Date: Jun 2002
Posts: 106
| gcc and g++ come nearly with all dist.(rehat suse mandreke....) use man gcc/g++ to learn how it works
__________________ C++ Makes you Feel Better "Gravity connot be held reponsible for people falling in love"--Albert Einstein |
| onurak is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiler Paths... | Cobra | C++ Programming | 5 | 09-26-2006 04:04 AM |
| C Compiler and stuff | pal1ndr0me | C Programming | 10 | 07-21-2006 11:07 AM |
| I can't get this new compiler to work. | Loduwijk | C++ Programming | 7 | 03-29-2006 06:42 AM |
| how to call a compiler? | castlelight | C Programming | 3 | 11-22-2005 11:28 AM |
| Bad code or bad compiler? | musayume | C Programming | 3 | 10-22-2001 09:08 PM |