PDA

View Full Version : Problems beginning to develope with iPhone SDK




davicente
Apr 4, 2008, 05:43 AM
Hello. Im 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 its impossible to resolve all them.
Id 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



Cromulent
Apr 4, 2008, 06:03 AM
Hello. Im 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 its impossible to resolve all them.
Id 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

What errors? List them.

davicente
Apr 4, 2008, 06:24 AM
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

Cromulent
Apr 4, 2008, 06:27 AM
Hang on. Just re-read your first post. Your not using the Apple SDK?

davicente
Apr 4, 2008, 06:36 AM
Im using the unnoficial SDK for the iPhone.

Cromulent
Apr 4, 2008, 07:15 AM
Im using the unnoficial SDK for the iPhone.

So not the Apple one then?

davicente
Apr 4, 2008, 07:26 AM
It isnt the Apple one. Here is a link to a web about it. This SDK has less restrictions that the Apple SDK.


http://www.iphoneatlas.com/2007/09/19/the-unofficial-iphone-sdk-guide-to-writing-native-iphone-applications/

Regards

Chundles
Apr 4, 2008, 07:32 AM
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.

Monkaaay
Apr 4, 2008, 07:36 AM
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.

davicente
Apr 4, 2008, 07:42 AM
The example that Im 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. Im a bit lost.
Thanks for your answers.
Regards.

Cromulent
Apr 4, 2008, 07:53 AM
The example that Im 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. Im a bit lost.
Thanks for your answers.
Regards.

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.

Sbrocket
Apr 4, 2008, 04:43 PM
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.

gnasher729
Apr 4, 2008, 05:05 PM
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 TargetConditionals.h:127: error: #error unrecognized GNU C compiler

These lines should give you a hint what is going wrong. You are somehow missing an ARM compiler and lots of ARM header files.

davicente
Apr 7, 2008, 01:49 AM
Thanks to all again for your answers.
It seems that the arm compiler is one of the principal problems. And its included with the toolchains. So, Ill try to install an older version of these.
And I cant use the official SDK, because the restrictions that it has are crucials to my project ;).
Thanks again.

shaggy.mac
Apr 8, 2008, 10:53 AM
Thanks to all again for your answers.
It seems that the arm compiler is one of the principal problems. And its included with the toolchains. So, Ill try to install an older version of these.
And I cant use the official SDK, because the restrictions that it has are crucials to my project ;).
Thanks again.

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

yayaba
Apr 8, 2008, 06:23 PM
Thanks to all again for your answers.
It seems that the arm compiler is one of the principal problems. And its included with the toolchains. So, Ill try to install an older version of these.
And I cant use the official SDK, because the restrictions that it has are crucials to my project ;).
Thanks again.

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.

davicente
Apr 9, 2008, 01:43 AM
Thanks again. It wasnt important to be comercial, but finish we have chosen the official SDK. I have gotten to compile the examples and Im 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.