Results 1 to 6 of 6
Sort-of-quick question regarding GCC. I just installed Fedora 7 PPC on my Powerbook G4 1ghz, 1gig memory.
When I installed Fedora 7, I checked the Programming Tools box to install, ...
- 07-25-2007 #1Just Joined!
- Join Date
- Mar 2006
- Posts
- 4
GCC Problem
Sort-of-quick question regarding GCC. I just installed Fedora 7 PPC on my Powerbook G4 1ghz, 1gig memory.
When I installed Fedora 7, I checked the Programming Tools box to install, and decided I would try to get into programming
. I picked up a copy of "Absolute Beginner's Guide to C" since it had good ratings online and looked like a good place to start.
I wrote out the first C program example in Nano and then tried compiling it with GCC. Here's the code:
I saved that and named it glimpse.C, and then tried "gcc glimpse.C". It loaded for a few seconds and then gave me this message:Code:#include <stdio.h> main() { printf("This C Stuff is easy!\n"); return 0; }
$ gcc glimpse.C
/tmp/cc66IvRW.o
.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

No matter what I do, even with other examples I copy from the book, and with different options appended to the command, I always get that message when I try to use GCC. Am I doing something wrong? What can I do to fix this?
Thanks in advance!
-Frankie G
- 07-25-2007 #2
i think the program is fine...it seems llike some gcc library file missing...
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 07-25-2007 #3Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
Rename your source file, don't use a capital as extension:
glimpse.c instead of glimpse.C.
Regards
- 07-25-2007 #4Just Joined!
- Join Date
- Mar 2006
- Posts
- 4
Works!
Thanks, Franklin, it works fine now. Looking at gcc's info file, I see that I was telling it to compile a C++ source file with regular C code... Oops! Thanks a lot for your help!
-Frankie G
- 07-25-2007 #5Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
- 07-26-2007 #6- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote
