GLBasic forum

Main forum => Off Topic => Topic started by: kaotiklabs on 2010-Jul-26

Title: iPhone C++ programming - Avoiding Objective-C
Post by: kaotiklabs on 2010-Jul-26
Hi,

I must program an iphone app in C++ for a postgraduate course. Must be a 2D game with high IA content.
I can´t lose time learning objective-C so I want to ask you where I can find some C++ wrapper in order to avoid any direct interaction with the objective-C.

As I must do it quickly, I was thinking about using directly a C++ game engine.
Do you know anyone good?

Thanks in advance.
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: Kitty Hello on 2010-Jul-26
First: GLBasic is compiled to C++ code. It's fast if you program right. If you really want C++ code, you can make a .cpp file and write:
Code (glbasic) Select

REQUIRE "myfile.cpp"
IMPORT int MyCppFunction()

...use as a GLBasic function now


In your .cpp file:
Code (glbasic) Select

#include "glb.h"
extern MyCppFunction()
{
// do something awesome here
}


Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: kaotiklabs on 2010-Jul-26
I know Kitty, if I had to choose I will allways use glbasic just for the simplicity.
In fact all my personal developments are now spining around glbasic just because I only need to concetrate in what I want to do and not in how to do it.
But for this university project teachers force us to go raw and use c++, opengl and templates.
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: trucidare on 2010-Jul-27
you cant use 100% ogl to create an iphone game. u need a few lines ObjC.
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: backslider on 2010-Jul-27
isn´t it possible to export the glbasic code as c++?  =D
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: trucidare on 2010-Jul-27
it is, the gpc does this. But internal there are some lines of objC
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: toprngr on 2010-Aug-03
According to me it is better if you learn from basic so first learn objectives of C it hardly takes 5-6 days so that your foundation will be strong. If you dont want to do that you can directly find many c++ games if you google it but you dont have sufficient knowledge from basic.
Title: Re: iPhone C++ programming - Avoiding Objective-C
Post by: toprngr on 2010-Aug-11
I have to say that this project is really going out of track. You can't create a pure C++ game without having any other languages supporting it, or maybe you can. As far as I know, if you need to develop a game, you will require something more than just c++. But I am quite optimistic that there is eventually a way that could solve your problem. I wish I could be more of a help.