Problems beginning to develope with iPhone SDK

Discussion in 'Mac Programming' started by davicente, Apr 4, 2008.

  1. macrumors newbie

    Joined:
    Apr 4, 2008
    #1
    Hello. I´m new in these forums and with de iPhone. I want to develop some applications for the iPhone with the unnoficial SDK. I have a Leopard in an Intel, with XCode 3.0 and toolchains v0.50. When I try to build a HelloWorld I get errors like "no such file or directory" with header files (".h") and "parse error before _STRUCT_MCONTEXT Location _structs.h". I have resolved some of them but it´s impossible to resolve all them.
    I´d like to know if someone of you have built some application, and what versions of toolchains have used, XCode, and if you have installed all tools with some guide.
    Thank you for the answers.
    Regards
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    What errors? List them.
     
  3. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #3
    Line Location _structs.h:135: error: parse error before '_STRUCT_MCONTEXT'
    Line Location _structs.h:33: error: arm/_structs.h: No such file or directory
    Line Location fenv.h:34: error: #error Unknown architecture
    Line Location FixMath.h:93: error: #error "Unknown architecture."
    Line Location fp.h:93: error: #error unsupported CPU
    Line Location fp.h:144: error: parse error before 'x'
    Line Location fp.h:144: error: parse error before 'cos'
    Line Location fp.h:155: error: parse error before 'sin'
    Line Location fp.h:155: error: parse error before 'x'
    Line Location fp.h:166: error: parse error before 'x'
    Line Location fp.h:166: error: parse error before 'tan'
    Line Location fp.h:177: error: parse error before 'acos'
    Line Location fp.h:177: error: parse error before 'x'
    Line Location fp.h:188: error: parse error before 'x'
    Line Location fp.h:188: error: parse error before 'asin'
    Line Location fp.h:199: error: parse error before 'atan'
    Line Location fp.h:199: error: parse error before 'x'
    Line Location fp.h:210: error: parse error before 'atan2'
    Line Location fp.h:210: error: parse error before 'y'
    Line Location fp.h:228: error: parse error before 'x'
    Line Location fp.h:228: error: parse error before 'cosh'
    Line Location fp.h:239: error: parse error before 'x'
    Line Location fp.h:239: error: parse error before 'sinh'
    Line Location fp.h:250: error: parse error before 'x'
    Line Location fp.h:250: error: parse error before 'tanh'
    Line Location fp.h:261: error: parse error before 'x'
    Line Location fp.h:261: error: parse error before 'acosh'
    Line Location fp.h:272: error: parse error before 'x'
    Line Location fp.h:272: error: parse error before 'asinh'
    Line Location fp.h:283: error: parse error before 'x'
    Line Location fp.h:283: error: parse error before 'atanh'
    Line Location fp.h:318: error: parse error before 'x'
    Line Location fp.h:318: error: parse error before 'exp'
    Line Location fp.h:329: error: parse error before 'x'
    Line Location fp.h:329: error: parse error before 'expm1'
    Line Location fp.h:340: error: parse error before 'exp2'
    Line Location fp.h:340: error: parse error before 'x'
    Line Location fp.h:351: error: parse error before 'x'
    Line Location fp.h:351: error: parse error before 'frexp'
    Line Location fp.h:362: error: parse error before 'x'
    Line Location fp.h:362: error: parse error before 'ldexp'
    Line Location fp.h:373: error: parse error before 'x'
    Line Location fp.h:373: error: parse error before 'log'
    Line Location fp.h:384: error: parse error before 'x'
    Line Location fp.h:384: error: parse error before 'log2'
    Line Location fp.h:395: error: parse error before 'x'
    Line Location fp.h:395: error: parse error before 'log1p'
    Line Location fp.h:406: error: parse error before 'x'
    Line Location fp.h:406: error: parse error before 'log10'
    Line Location fp.h:417: error: parse error before 'x'
    Line Location fp.h:417: error: parse error before 'logb'
    Line Location fp.h:442: error: parse error before 'x'
    Line Location fp.h:442: error: parse error before 'modf'
    Line Location fp.h:471: error: parse error before 'x'
    Line Location fp.h:471: error: parse error before 'scalb'
    Line Location fp.h:494: error: parse error before 'fabs'
    Line Location fp.h:494: error: parse error before 'x'
    Line Location fp.h:505: error: parse error before 'hypot'
    Line Location fp.h:505: error: parse error before 'x'
    Line Location fp.h:516: error: parse error before 'pow'
    Line Location fp.h:516: error: parse error before 'x'
    Line Location fp.h:527: error: parse error before 'x'
    Line Location fp.h:527: error: parse error before 'sqrt'
    Line Location fp.h:551: error: parse error before 'x'
    Line Location fp.h:551: error: parse error before 'erf'
    Line Location fp.h:562: error: parse error before 'x'
    Line Location fp.h:562: error: parse error before 'erfc'
    Line Location fp.h:573: error: parse error before 'x'
    Line Location fp.h:573: error: parse error before 'gamma'
    Line Location fp.h:584: error: parse error before 'lgamma'
    Line Location fp.h:584: error: parse error before 'x'
    Line Location fp.h:625: error: parse error before 'x'
    Line Location fp.h:625: error: parse error before 'ceil'
    Line Location fp.h:636: error: parse error before 'x'
    Line Location fp.h:636: error: parse error before 'floor'
    Line Location fp.h:647: error: parse error before 'rint'
    Line Location fp.h:647: error: parse error before 'x'
    Line Location fp.h:658: error: parse error before 'nearbyint'
    Line Location fp.h:658: error: parse error before 'x'
    Line Location fp.h:669: error: parse error before 'x'
    Line Location fp.h:680: error: parse error before 'x'
    Line Location fp.h:680: error: parse error before 'round'
    Line Location fp.h:691: error: parse error before 'round'
    Line Location fp.h:702: error: parse error before '_trunc_return_type'
    Line Location fp.h:713: error: parse error before 'x'
    Line Location fp.h:713: error: parse error before 'trunc'
    Line Location fp.h:737: error: parse error before 'x'
    Line Location fp.h:737: error: parse error before 'fmod'
    Line Location fp.h:748: error: parse error before 'remainder'
    Line Location fp.h:748: error: parse error before 'x'
    Line Location fp.h:759: error: parse error before 'remquo'
    Line Location fp.h:759: error: parse error before 'x'
    Line Location fp.h:790: error: parse error before 'x'
    Line Location fp.h:790: error: parse error before 'copysign'
    Line Location fp.h:1092: error: parse error before '__inf'
    Line Location fp.h:1167: error: parse error before 'x'
    Line Location fp.h:1167: error: parse error before 'fdim'
    Line Location fp.h:1178: error: parse error before 'fmax'
    Line Location fp.h:1178: error: parse error before 'x'
    Line Location fp.h:1189: error: parse error before 'fmin'
    Line Location fp.h:1189: error: parse error before 'x'
    Line Location fp.h:1205: error: parse error before 'pi'
    Line Location fp.h:1266: error: parse error before 'randomx'
    Line Location fp.h:1266: error: parse error before '*' token
    Line Location fp.h:1292: error: parse error before 'x'
    Line Location fp.h:1338: error: 'SIGDIGLEN' undeclared here (not in a function)
    Line Location fp.h:1358: error: parse error before 'double_t'
    Line Location fp.h:1369: error: parse error before 'dec2num'
    Line Location limits.h:10: error: #error architecture not supported
    Line Location MachineExceptions.h:340: error: parse error before '*' token
    Line Location MachineExceptions.h:374: error: parse error before '*' token
    Line Location math.h:30: error: #error Unknown architecture
    Line Location NSObjCRuntime.h:139: error: 'LONG_MAX' undeclared here (not in a function)
    Line Location OSByteOrder.h:33: error: libkern/arm/_OSByteOrder.h: No such file or directory
    Line Location OSByteOrder.h:42: error: syntax error before 'uint16_t'
    Line Location OSByteOrder.h:55: error: syntax error before 'uint32_t'
    Line Location OSByteOrder.h:68: error: syntax error before 'uint64_t'
    Line Location OSByteOrder.h:69: error: syntax error before 'int32_t'
    Line Location OSByteOrder.h:83: error: syntax error before 'void'
    Line Location OSByteOrder.h:92: error: syntax error before 'uint16_t'
    Line Location OSByteOrder.h:102: error: syntax error before 'uint32_t'
    Line Location OSByteOrder.h:112: error: syntax error before 'uint64_t'
    Line Location OSByteOrder.h:124: error: syntax error before 'void'
    Line Location OSByteOrder.h:135: error: syntax error before 'void'
    Line Location OSByteOrder.h:146: error: syntax error before 'void'
    Line Location OSByteOrder.h:94: error: syntax error before 'void'
    Line Location prueba2App.h:3: error: LayerKit/LayerKit.h: No such file or directory
    Line Location TargetConditionals.h:127: error: #error unrecognized GNU C compiler
     
  4. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Hang on. Just re-read your first post. Your not using the Apple SDK?
     
  5. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #5
    I´m using the unnoficial SDK for the iPhone.
     
  6. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    So not the Apple one then?
     
  7. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #7
  8. macrumors G4

    Chundles

    Joined:
    Jul 4, 2005
    #8
    So not the actual product then?

    Houston, we have a problem...

    You need to be using the official SDK - just because the other one has less restrictions doesn't mean it's going to work. It's like entering a donkey in a horse race because it sort of looks like a horse.

    Try your code with the genuine SDK and see if you still have the same issues.
     
  9. macrumors 6502

    Monkaaay

    Joined:
    Jun 19, 2006
    Location:
    Richmond, VA
    #9
    Interesting. I would stay away from those kinds of things. Yes, it's fun and interesting to play around with your phone. But if you're really into the distribution of your creation, using a framework that requires people to hack their phones isn't going to get you very far.
     
  10. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #10
    The example that I´m compiling is done for this SDK. So my question is if somebody is using this SDK and what configuration has, because I think the problem is in the toolchain version. I´m a bit lost.
    Thanks for your answers.
    Regards.
     
  11. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #11
    Why not use the official one and then when you are more comfortable use the other one? Starting off with what is in essence a hack is probably a bad way to go.
     
  12. macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #12
    I'd say, if anything, you didn't setup the toolchain right. There's plenty of stuff in other places that will show you the right way to set it up, but I doubt anyone on this forum is going to know how to build that toolchain. Obviously there are plenty of other developers out there that have gotten it to work so it's likely something you've done wrong, missed a step, wrong build directory, something.
     
  13. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #13
    These lines should give you a hint what is going wrong. You are somehow missing an ARM compiler and lots of ARM header files.
     
  14. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #14
    Thanks to all again for your answers.
    It seems that the arm compiler is one of the principal problems. And it´s included with the toolchains. So, I´ll try to install an older version of these.
    And I can´t use the official SDK, because the restrictions that it has are crucials to my project ;).
    Thanks again.
     
  15. macrumors newbie

    Joined:
    Apr 8, 2008
    #15
    You can use the Unrestricted Apple SDK if you wanted.

    Just include the Private Headers and you get the same results with the OpenTool Chain
     
  16. macrumors 6502

    Joined:
    Apr 24, 2007
    Location:
    San Francisco Bay Area
    #16
    Well, you just need to be aware that the market for your app is going to be a lot smaller as time moves forward. I don't think people are going to be jailbreaking that much after 2.0 comes out.
     
  17. thread starter macrumors newbie

    Joined:
    Apr 4, 2008
    #17
    Thanks again. It wasn´t important to be comercial, but finish we have chosen the official SDK. I have gotten to compile the examples and I´m already working. I think the problem was the version of Leopard, because the las SDK works in 10.5.2 and later, and I was 10.5.1. I had to update my Leopard and the official SDK worked ok. Thanks. Regards.
     

Share This Page