Find the answer to your Linux question:
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, ...
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    Posts
    4

    Question 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:
    Code:
    #include <stdio.h>
    main()
    {
            printf("This C Stuff is easy!\n");
            return 0;
    }
    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:
    $ 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

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Question

    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
    -------------------

  3. #3
    Linux 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

  4. #4
    Just Joined!
    Join Date
    Mar 2006
    Posts
    4

    Talking 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

  5. #5
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Quote Originally Posted by JollyRogerBass View Post
    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
    Your welcome, good to hear it's working now.

    Regards

  6. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Lightbulb

    Quote Originally Posted by Lakshmipathi View Post
    i think the program is fine...it seems llike some gcc library file missing...
    ....ohhh...sorry i also missed that .C ....
    - 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
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...