GLBasic forum

Main forum => GLBasic - en => Topic started by: bigsofty on 2010-May-01

Title: XCode iPhone + Simulator
Post by: bigsofty on 2010-May-01
Hi,

Just an idea but would it be possible to miss out the GCC compilation phase on Windows and just pump straight 'C' source code into an XCode project?

Pluses/Minuses...

+ Able to use the simulator.
+ Inline Objective-C(?)
+ Allowing access to the full Apple SDK

- GCC compilation error messages would only show up on the Mac
-?

Anything to add?
Title: Re: XCode iPhone + Simulator
Post by: trucidare on 2010-May-01
- No License check for kungphoo.

Title: Re: XCode iPhone + Simulator
Post by: bigsofty on 2010-May-02
Yes, that's a problem I never thought of...  ;/
Title: Re: XCode iPhone + Simulator
Post by: trucidare on 2010-May-02
You have full ObjC access yet and use all of apples apis.
just copy headers and libs and frameworks from your mac to glbasic compiler folder.

but simulator, sorry no support for that.
Title: Re: XCode iPhone + Simulator
Post by: bigsofty on 2010-May-02
Interesting, I (wrongly?) assumed that the GCC that shipped with GLB was not ObjC compatible, only C/C++.  And I'll, take your advice with the frameworks too Truci. ;)

Very handy tips, thank you!


Ian
Title: Re: XCode iPhone + Simulator
Post by: trucidare on 2010-May-02
it is fully objc compatible. You only have to get the libs headers and frameworks, because shipping of it are not legal, so doit yourselfe.

created some cocoa touch thingies directly on glbasic with objc.
Title: Re: XCode iPhone + Simulator
Post by: mykyl66 on 2010-May-04
Not sure what this kungphoo thing is but in my dreams I see a huge advantage in seeing and doing final edits of my code directly in xcode without have windows grabbing ram and the back and forth of bits and pieces between os x and windows.

Maybe one day. Of course if the mac ide ends up being usable by the rest of us that would at least allow me to dump windows finally and fully.

Mike
Title: Re: XCode iPhone + Simulator
Post by: aonyn on 2010-Sep-09
@ trucidare,

I have looked at the developer folder on my mac, where xcode is installed, and also the compiler folder for glbasic, but I am not entirely clear what I need to put where.
I have some guesses, but I am not entirely clear, and was wondering if I could please request a bit of help getting started using the iphone api.

Thank in advance!

regards,
Dave
Title: Re: XCode iPhone + Simulator
Post by: Chris on 2010-Sep-20
Quote from: aonyn on 2010-Sep-09
@ trucidare,

I have looked at the developer folder on my mac, where xcode is installed, and also the compiler folder for glbasic, but I am not entirely clear what I need to put where.
I have some guesses, but I am not entirely clear, and was wondering if I could please request a bit of help getting started using the iphone api.


Did you get an answer for where to take the headers and libs and frameworks from and where to put them to?

I may need to do something similar.
Title: Re: XCode iPhone + Simulator
Post by: trucidare on 2010-Sep-20
Writing a PN is more efficient to get an answer from me.

For including objc things to your game you only open your xcode project created with glbais add new .mm files to it and start coding like without glbasic. to call the functions in glbasic you need to wrapp it like extern "C" void mow() {} and in glbasic you must only do IMPORT "C" void mow()

then you can simply use mow in glbasic code like a normal glbasic function. beware you need to provide the .mm file everytime.
Title: Re: XCode iPhone + Simulator
Post by: Gary on 2010-Sep-21
Just out of interest what is the reasons for the simulator not working? Seems strange that the code will run on the actual device but not the simulator. Would be very handy if it could as I dont have my iPad yet but want to start developing and want to go the step futher than just running on a pc as a windows app
Title: Re: XCode iPhone + Simulator
Post by: aonyn on 2010-Sep-21
Thanks trucidare,

I will experiment with it as I have time, and I hope you don't mind, I may take you up on the offer for PM questions if I get stuck (I promise to try not to be annoying about it)  :)

regards,
Dave
Title: Re: XCode iPhone + Simulator
Post by: trucidare on 2010-Sep-21
The reason is the lib could be only compiled for arm platform - i386 wont work, so we couldnt provide libs for simulator. sorry for that :/