Weird Error Message.

Discussion in 'iOS Development' started by Spreche, Aug 2, 2008.

  1. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    I tried compiling my source code and this is the error that came up. I've tried multiple times to fix it, but couldn't. I restored it to my best of knowledge to what it was before this error occurred and still nothing. Helpp is appreciated. Thanks in advance.

    Code:
    arm-apple-darwin9-gcc -c -I/var/include  main.m -o main.o
    In file included from iShop.h:5,
                     from main.m:2:
    PurchaseFromList.h:21: error: stray '@' in program
    PurchaseFromList.h:21: warning: data definition has no type or storage class
    PurchaseFromList.h:23: error: stray '@' in program
    PurchaseFromList.h:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    PurchaseFromList.h:25: error: stray '@' in program
    PurchaseFromList.h:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    In file included from main.m:2:
    iShop.h:31: error: stray '@' in program
    main.m:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    main.m:10: error: expected '@end' at end of input
    make: *** [main.o] Error 1
    
  2. jonmisurda

    jonmisurda New Member

    Joined:
    Jul 19, 2008
    Messages:
    46
    Likes Received:
    0
    Device:
    iPad 2 (Black)
    Code:
    PurchaseFromList.h:21: error: stray '@' in program
    I got that once when I forgot to close a string with "
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    Ok, if you're trying to use an unpatched SDK header with iphone-gcc you will get an error similar to that. is that what you're doing?.
  4. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    No, I have no idea how to get the 2.0 SDK headers. I did nothing to the toolchain. Here are the header files that the errors are coming from.

    EDIT: Took out source code. I found the answer.

    I figured out the problem. The answer is kind of weird, but I fixed it. Yesterday I decided to try out CuteFTP and was working fine for a while. Then this error happened. So I switched back to WinSCP and everything works great. I guessing its the way CuteFTP transferred my files from my computer to the iPhone. Thanks for the answers though guys!

    EDIT 2: Sorry I forgot my new error.

    Does anyone know how I can fix this?

    Code:
    arm-apple-darwin9-gcc -c -I/var/include  main.m -o main.o
    arm-apple-darwin9-gcc -c -I/var/include  iShop.m -o iShop.o
    arm-apple-darwin9-gcc -c -I/var/include  PurchaseFromList.m -o PurchaseFromList.o
    arm-apple-darwin9-gcc -framework Foundation -framework UIKit -framework CoreFoundation -framework CoreGraphics -lobjc -L"/usr/lib" -F"/System/Library/Frameworks" -F"/System/Library/PrivateFrameworks" -bind_at_load -o iShop main.o iShop.o PurchaseFromList.o
    /usr/bin/ld: warning multiple definitions of symbol _NSStreamDataWrittenToMemoryStreamKey
    /System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of _NSStreamDataWrittenToMemoryStreamKey
    ...
    **Long list of the same kinds of lines above and below this**
    ...
    /usr/bin/ld: warning multiple definitions of symbol ___crashreporter_info__
    /System/Library/Frameworks/Foundation.framework/Foundation(single module) definition of ___crashreporter_info__
    /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation(single module) definition of ___crashreporter_info__
    [B]/usr/bin/ld: Undefined symbols:
    _OBJC_CLASS_$_UIButtonBarButton
    collect2: ld returned 1 exit status
    make: *** [iShop] Error 1[/B]
    
  5. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55

    Yes, that means that UIButtonButtonBarButton doesn't exist in the frameworks for 2.0. Instead, look at using UIToolbar stuff
  6. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    So basically I can't use the UIButtonBar either way. So it doesn't exist in the 2.0 frameworks, which I don't have, but it does exist in the UIKit header files that are included with the toolchain. So I just can't create a toolbar(iPod or Youtube's bottom bars) without the 2.0 headers?
  7. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    basically.

    try putting this in UIButtonBar.h in your UIKit inlcude direcotry


    #define UIButtonBar UIToolbar
  8. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    Oh. LOL. Well that line of code is already in UIButtonBar.h. So do I just need to replace all the UIButtonBar's with UIToolbar in my source code?

    Example:
    Code:
    UIButtonBar *myButtonBar;
    
    To
    Code:
    UIToolbar *myToolbar;
    
  9. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55

    how bout you dont try and use the hardest possibly UIKit object you can right off. start with some easier stuff
  10. Spreche

    Spreche Member

    Joined:
    Dec 27, 2007
    Messages:
    164
    Likes Received:
    0
    Device:
    iPhone
    LOL good idea. Thanks anyway though.

Share This Page