Urgent!! need help with code

Discussion in 'iOS Development' started by harish87, Dec 29, 2009.

  1. harish87

    harish87 New Member

    Joined:
    Dec 4, 2009
    Messages:
    8
    Likes Received:
    0
    Device:
    3G iPod touch
    CC=arm-apple-darwin-gcc
    LD=$(CC)
    LDFLAGS =
    -framework CoreFoundation \
    -framework Foundation \
    -framework UIKit \
    -L"/usr/lib" \
    -F"/System/Library/Frameworks" \
    -F"/System/Library/PrivateFrameworks" \
    -lobjc
    CFLAGS = -I"/var/include"
    all: serial

    serial: serial_complete.o
    $(LD) $(LDFLAGS) -o $@ $^


    %.o: %.c
    $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

    clean:
    rm -f *.o serial

    nice:
    rm -f *.o

    while I run this makefile I am getting the error
    ld: library not found for -lobjc
    collect2: ld returned 1 exit status

    please...i am pressing on time...thankz!!!!!!!!
  2. jrcdude

    jrcdude New Member

    Joined:
    Jul 12, 2008
    Messages:
    47
    Likes Received:
    0
    Device:
    iPad 2 (White)
    Try removing the:

    Code:
    -lobjc
    
    as that part is what seems to be causing the error?
  3. harish87

    harish87 New Member

    Joined:
    Dec 4, 2009
    Messages:
    8
    Likes Received:
    0
    Device:
    3G iPod touch
    not really that error...its seems to be the error with the GCC itself....its not just -lobjc....its not finding any of the frameworks either.....and no matter wut program i try to compile......

    My iphone sdk is 3.1.2 3G and i installed libgcc through ssh....and Toolchain 2.0 using Cydia....i am not quite sure wut is causing this problem

    Also....i used Mac to build the tool chain and run the executable on it....(AS provide on Devdot Iphone Serial Port Tutorial by TheRain) the serial port is not opening at all....the Ipod Touch is just Killing the program.... meaning when i run the executable...it says "Killed" and aborts.

    kindly appreciate some on that issue as well.
  4. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    The iPhone will only run signed code; you will have to pseudo-sign your binary. Use saurik's ldid from Cydia, or grab it for the Mac.

    ldid -S <binary>
  5. harish87

    harish87 New Member

    Joined:
    Dec 4, 2009
    Messages:
    8
    Likes Received:
    0
    Device:
    3G iPod touch
    problem is that....it is not even going towards chking the signing part....its throwing an error at the linker part itself....it seems to me that GCC is not able to find libraries under its search options....but even when we added where they are its still not finding it...
  6. supersocialist

    supersocialist New Member

    Joined:
    Mar 3, 2008
    Messages:
    4
    Likes Received:
    0
    Device:
    iPhone
    Did you ever get this sorted? I am having the same problem.

    I'm compiling for 3.1.2/2G on Ubuntu 9.10. My research so far indicates that I need the arm/iphone lobjc and what I have is the intel/linux lobjc. I haven't figured out where to get the correct libraries.
  7. freelow

    freelow New Member

    Joined:
    Jan 5, 2010
    Messages:
    5
    Likes Received:
    0
    ld: library not found for -lobjc

    does libobjc.dylib exists in you lib path? -L"/usr/lib"

Share This Page