I cannot get g++ to work on my mac OS 10.5.2

Discussion in 'Mac Programming' started by cteeter, May 21, 2008.

  1. cteeter macrumors newbie

    Joined:
    May 21, 2008
    #1
    When I was using my old computer g++ worked standard. On the new computer it doesn't. So I installed XcodeTools.mpkg from xcode_2.2.1_8g1165_018213632.dmg

    I would like to be able to compile from my terminal window. However when I try to compile something I keep getting an error like this:

    g++ helloworld.cpp
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/libstdc++.dylib load command 5 unknown cmd field
    /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
    /usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
    collect2: ld returned 1 exit status

    when I type in version --g++ it says:

    i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5250)
    Copyright (C) 2005 Free Software Foundation, Inc.

    so I think it is there.

    I'm not sure what to do. Can anyone help?

    Thanks
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Your using an old version of Xcode by the looks of it. Download Xcode 3 from the Apple site.
     
  3. cteeter thread starter macrumors newbie

    Joined:
    May 21, 2008
    #3
    don't see X code 3

    Maybe I am retarded but I can't find X code 3 on the apple site.
     
  4. italiano40 macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
  5. cteeter thread starter macrumors newbie

    Joined:
    May 21, 2008
    #5
    Thanks now working!

    Yup it is now working thanks!
     

Share This Page