Can't get HelloWorld Compiled

Discussion in 'iOS Development' started by MiG™, Nov 30, 2007.

  1. MiG™

    MiG™ New Member

    Joined:
    Oct 10, 2007
    Messages:
    93
    Likes Received:
    0
    So i finally got the toolchain installed, but now when I compile it in Cygwin, I get this:

    Code:
    $ make
    arm-apple-darwin-gcc -c   hello.m -o hello.o
    arm-apple-darwin-gcc -c   HelloApplication.m -o HelloApplication.o
    arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework Foundation -fra
    mework UIKit -framework LayerKit -o Hello hello.o HelloApplication.o
    /usr/local/bin/arm-apple-darwin-ld: /usr/local/share/iphone-filesystem/usr/lib/l
    ibstdc++.6.dylib truncated or malformed object (mach header extends past the end
     of the file)
    collect2: ld returned 1 exit status
    make: *** [Hello] Error 1
    Fixed the symlinks numerous times now, opened up the offending file but no joy.

    Any ideas?
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    That is an easy enough fix. Take the libSystem.B.dylib and make two copies of it. Name the copies libc.dylib and libSystem.dylib then try to recompile the HelloWorld.
  3. MiG™

    MiG™ New Member

    Joined:
    Oct 10, 2007
    Messages:
    93
    Likes Received:
    0
    Same error. But I am unsure as to why you would think that would work when the file in question is libstdc++.
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Whoops, I didn't catch the C++ part. I don't have my computer in front of me, so I can't tell you exactly which file you need to copy, but just look at which file libstcc++.6.dylib points to and do the exact same procedure, copy and rename.

    I had more luck doing things that way than I did by setting the links,
  5. MiG™

    MiG™ New Member

    Joined:
    Oct 10, 2007
    Messages:
    93
    Likes Received:
    0
    OOooooohhhh.

    Toolchain now installed and HelloWorld Compiled

    Please Register or Log in to view images



    Cheers.

Share This Page