Page 1 of 1

iPhone HelloWorld

PostPosted: Apr 23, 2009 @ 11:20am
by Lucyberad
Hi,
Im having some trouble at setting up the Helloworld for iPhone.
I've follow the steps and it result in 100 errors at compiling.
I've tried with given sample (by adding directory of libraries) but it result the same: 100 errors.

Here is a screenshot of debug log:
Image

Cordialy,
Lucyberad

PostPosted: Apr 23, 2009 @ 11:45am
by Lucyberad
I give you the XCode Project folder (See attachements).

PostPosted: Apr 28, 2009 @ 7:02am
by edge
Hi,

I've checked your project and libedge and libedgerender are there, which is good. Also, it doesn't complain it can't find a library (which is also good). Perhaps it is using simulator libraries for a device build or vice versa?

PostPosted: Apr 28, 2009 @ 4:04pm
by Lucyberad
Thanks for your answer.

I've just tried to compile it for Device and it seems working quite well...
Helloword is not write down, but the App start and Edgelib wartermark is blinking strangely... (I will check my helloworld.cpp file).
I changed nothing in source code, libraries etc... just choosed Device.

I've tried to change project property: "Base SDK" from Device 2.2 to Simulator 2.2 and it still crash in simulator.
I redo the project and it crash the same... I don't know why simulator can't Handle Edgelib and device works better.

does edgelib need different library for simulator and device? (because I think that I use the same one).

Cordially,
Lucyberad

PostPosted: Apr 28, 2009 @ 9:30pm
by edge
Hi,

Yes, you need to specify different libedge.a and libedgerender.a libraries for the simulator. You can also try to make a clean build before testing.

The getting started tutorial on edgelib.com describes how to link seperate libraries when having multiple targets (device or simulator).

PostPosted: Apr 29, 2009 @ 11:12am
by Lucyberad
Ok, I finally understand how to create 2 targets, compile it adding library etc...
I've redone the project (one more time) and I understand something: when you create a new target, you need to add yourself files to compile.
Because it started into a black screen with an "Unknow error" from debugger (why it can't tell there is no main or something like that?), so i added my helloworld.cpp to files to compile.
And there, I got another problem; 1995 errors (yep, i'm doing better than before ^^).
But this time I could understand why: i'm trying to compile a C++ file so XCode reject all Obj-C files...
Then it produce something ridiculous like that:
Image
(top is debugger log, down is the line where the last error is found). You can see that the "-" token from methods declaration of Obj-C is reject. If you know what can I do to handle this... I would be happy to get some help from you.

Thanks for the help you give. I'm new to iPhone Dev (i'm intially from J2ME and DirectX Csharp market ^^) and I'm think that some people are in the same case as me.

Here is the new project: http://rapidshare.com/files/227057772/H ... b.zip.html
(too big for attachements: 1,5mo)

PostPosted: Apr 29, 2009 @ 4:07pm
by Lucyberad
I did'nt notice that the simulator project don't include standard library...
it's fixed now: http://rapidshare.com/files/227152272/H ... b.zip.html
But there is still 1995 errors to go...

Edit: all errors are in UIKit.h

PostPosted: Apr 30, 2009 @ 9:58pm
by edge
Hi,

Please check all your headers files including UIKit.h. Then check for C++ files including that header file.

For example, you have class.cpp and class.h files, and the class.h header file includes UIKit.h. In this case the class.cpp includes the class.h header file, which in turn includes UIKit.h generating the errors.

PostPosted: Jun 18, 2009 @ 11:45am
by jrhee
Hi,

I'm getting the same issue Lucy described in her first post (100 linking errors).

I copied my Edge folder contents from my PC into /Projects/Edge, and saved the tutorial result sample contents to /Projects/helloworld_iphone. I checked and confirmed that my simulator target uses the simulator libs and my device target uses the device libs. My application and build target are both set to simulator. Is there anything else I can check?

Thanks,
John

PostPosted: Jun 26, 2009 @ 8:13am
by edge
Hi,

Please also try to build the helloworld sample that comes with the SDK itself. If you still have linker issues, please post them. Then we can see where it fails.