Can`t compile under Mac OS 1.6.4 Example Pong.

Previous topic - Next topic

VlasovAlexey

Hi,
I have a problem with compiling under XCode 3.2. Use GLBasic 8.x Demo from your site. I'm test "Pong" project. After some setup GLBasic environment, have XCode folder with message

_______________________________________
*** Configuration: IPHONE ***
precompiling:
GPC - GLBasic Precompiler V.8.044 SN:9bc42999 - 2D, WIN32
Wordcount:74 commands
compiling:
arch:
Creating .app for PongBW
before copy...
...build the Project in: C:\Users\_All_\Desktop\GLPrg\GLBasic\Samples\_Projects_\Pong\XCode on Mac,
   then compile and release.
success
_______________________________________
*** Finished ***
Elapsed: 4.6 sec. Time: 20:20
Build: 1 succeeded.

Copy to virtual system MacOS to Desktop and open project. Configure paths to Frameworks.
I make all steps in this guide http://www.glbasic.com/xmlhelp.php?lang=en&id=313&action=view and still have error

[BEROR] error: There is no SDK with the name or path `iphoneos3.0`

Another question. Can't choose compiling to `Simulator` and have error 'SDK Missing'

For clearly please see this shots from Mac OS

http://scan3d.ru/public_downloads/GLBasic/glbasic_01.jpg
http://scan3d.ru/public_downloads/GLBasic/glbasic_02.jpg
http://scan3d.ru/public_downloads/GLBasic/glbasic_03.jpg

Another good point. If create default GL Project from Standard XCode template - all work and compile fine!

How fix this?

I'm beginner under MacOS, but have good skill under Windows programming and understand - need configure paths and some setup environment.
If possible, make complete guide (step by step may be useful for another like me).

If you need more info from my side, please tell me and I make it.

Thanks!

Millerszone

I believe the problem is that you have to purchase the "GLBasic SDK premium"
Here:
http://www.glbasic.com/main.php?site=order&lang=en#PayPay-2009

Also, GLBasic doesn't work with xcode simulator.
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Ian Price

Go to Project > Edit Active Target "iPhone" > Base SDK and set IOS Device  to your current OS number (It'll probably show "3.xx Missing") - changed mine to 4.1 (the current update for iPod Touch). Exit then click where it says Base SDK Missing and click on Release. This works everytime for me.
:)

You can't run the "Simulator" - it has to be "Release"

This is for the Premium version only.
I came. I saw. I played.

VlasovAlexey

#3
Thanks for fast answers!
I'm download your precompiled example " iPhone Touch demo" and move to Mac OS.

Make all your changes and ... can change to Simulator and don`t have errors after loading project!

But after start compiling still have several errors. See pictures below

http://scan3d.ru/public_downloads/GLBasic/steep01.jpg
http://scan3d.ru/public_downloads/GLBasic/steep02.jpg
http://scan3d.ru/public_downloads/GLBasic/steep03.jpg
http://scan3d.ru/public_downloads/GLBasic/steep04.jpg
http://scan3d.ru/public_downloads/GLBasic/steep05.jpg

Ian Price

You have SIMULATOR selected. You need to use DEVICE and RELEASE mode, not DEBUG.
I came. I saw. I played.

VlasovAlexey

#5
Not working with Emulator?! I'm confused. It is incredible for real develop.

Thanks for patience and my terrible English. ;)

MrTAToad

The emulator runs under the Intel processor, whilst iPhone's use ARM.  Gernot did say why the emulator cant be used, but I cant find the post

VlasovAlexey

Ian Price may be, you're wrong.
Unfortunately, my English is not too good, so, please, read this http://en.wikipedia.org/wiki/Virtualization.

In a word, it doesn't matter what platform you're working with, basic tools use full virtualization
http://en.wikipedia.org/wiki/Full_virtualization

Any application made with XCODE can be launched in an emulation mode. It is compiled using ARMV6-7 architecture and runs on simulator, which means that project settings are the same as in the GLBasis generated project. It shows that internal XCODE simulator supports ARM architecture emulation.


I have a couple of questions to developers:

1. Will Newton SDK sample run on iPhone or iPad correctly? I'm not concerned about the speed right now, but the possibility itself.

2. Are there any examples of using Box2D physics for iPhone? (source-files I mean) What are the restrictions?

3. What are the additional restrictions for compiling a project for iPhone, except those described in help section? I mean some programming/memory management refinement, if there are any at all.

4. By the way, how exactly is memory unloading organized? Is there any kind of a memory manager or maybe methods of working with memory for iPhone?


Thank you for your time!

Ian Price

#8
QuoteIan Price may be, you're wrong.
Unfortunately, my English is not too good, so, please, read this http://en.wikipedia.org/wiki/Virtualization.

It has nothing to do with virtualisation. XCode won't/can't run GLBasic iPhone apps under SIMULATION, ask Kitty Hello for specific the reasons. You have to create the game for an actual device and not run it in DEBUG mode. MrTatoad stated the same.

[EDIT] Made clearer. Maybe?
I came. I saw. I played.

ampos

Do you have all provisioning and keychain and all the other stuff setup on MacOS?

The "simulator" in Windows GLB :)

Kitty Hello

Quote from: VlasovAlexey on 2010-Nov-30
Any application made with XCODE can be launched in an emulation mode. It is compiled using ARMV6-7 architecture and runs on simulator, which means that project settings are the same as in the GLBasis generated project. It shows that internal XCODE simulator supports ARM architecture emulation.

I have a couple of questions to developers:

1. Will Newton SDK sample run on iPhone or iPad correctly? I'm not concerned about the speed right now, but the possibility itself.

2. Are there any examples of using Box2D physics for iPhone? (source-files I mean) What are the restrictions?

3. What are the additional restrictions for compiling a project for iPhone, except those described in help section? I mean some programming/memory management refinement, if there are any at all.

4. By the way, how exactly is memory unloading organized? Is there any kind of a memory manager or maybe methods of working with memory for iPhone?
Hi,

the "Simulator" Apple ships is not an "emulator". You would have to compile x86 code for testing your iPhone program on a Mac - which is very silly, because you have no gravity and stuff. Get a real device and it's OK.
You can compile for iPhone with the FREE version. However, the running program will indicate that and quit after I think 5 minutes or so.

Questions:
1. Newton is not ported, yet. For iPhone you want the 2D Box2D physics engine, which is supported.
2. Yes, it works. You have to set a compiler flag due to a GCC optimization bug, though. Search the forums. Very few example projects, yet. But in the App-Store thread there is one.
3. There's no restrictions. GLBasic compiles to C++/objC code and you compile a real XCode project. You can extend it to whatever you want with inline code.
4. To unload memory, you can free sprites (LOADSPRITE "", id%), sounds and release array memory with DIM arr[0].

HTH,
-Gernot

VlasovAlexey

OK. It works with 7.203 GLBasic. But if I use newer version 8.х, I get this compilation error message:
---
Linking <path to build>build/Release-iphoneos/iTouchMouse.app/iTouchMouse(1 error)
    collect 2: Id terminated with signal 6(Abort trap)
Command <path to GCC Compiler> failed with exit code 1
---
I think the problem is in the compiler or the project's settings. What version XCode and Iphone SDK should be to use GLBasic 8.х?

Ian Price

#12
You need to use the latest XCode with the latest iOS (or an XCode that compiles to the same version of iOS as your iDevice). XCode and iOS recently had updates. Download both, install XCode, then try compiling again.

I'm not sure your error is related to that though - I recently updated my iPod, but not my XCode and I got errors, but they weren't the same you are reporting. My errors were obvious in the fact that XCode was an old version and iOS 4.2 wasn't supported. But anyway, update everything, and try again. Let us know how you got on.

Remember you must ensure that you are writing for a DEVICE (not a simulator) and that the BASESDK matches your iPhone/iPod/iPad iOS.
I came. I saw. I played.

VlasovAlexey

#13
After very strange manipulation with XCode versions all works fine.
Another problem. 3D Examples doesn't load textures and models. Simply - all media not found.

I put Resources to media folder. But still get "flat" render.

You can download "Islands" example compiled by me for IPhone.

http://scan3d.ru/public_downloads/IslandsBug.zip

Thanks for Help!

p.s. " iPhone Touch demo" load sprite fine...

Kitty Hello

try a drawsprite for the texture to see if it was loaded properly? It should work, as there are 3D examples on youtube that use textures.