GLBasic forum

Feature request => IDE/Syntax => Topic started by: bigsofty on 2010-Apr-23

Title: iPhone Console Version
Post by: bigsofty on 2010-Apr-23
Is it possible to have a "console only" version for the iPhone?

That is, a version. that has...

No attached graphical lib(or openGL context).
No sound lib.
etc...

Just the GLB to 'C' runtime.

Think of it as a Windows Console compile but for the iPhone.

This would allow the use of 3D party iPhone libraries with GLB, for sound, graphics ect... without getting linking errors/system errors.

Cheers,


Ian
Title: Re: iPhone Console Version
Post by: trucidare on 2010-Apr-23
that wouldnÃ,´t be glbasic anymore.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-23
You could argue the same for the "console only" executables that GLB can compile for windows?

My problem is this...

I have tried to attach another, 3rd party graphical library to GLBasic, when linking is being done by the GLB XCode project and the new framework that is introduced by me, duplicate definitions errors within the .o object code within the .a static libraries that GLBasic produces cause the compile to fail. I have no control of the compilation and inclusion of the various elements that make up the .a files (and I don't want to remove them carelessly). If another method can be found to avoid duplicate definition errors when attempting to use another 3rd party iPhone lib together with GLB, then I am all ears.
Title: Re: iPhone Console Version
Post by: Kuron on 2010-Apr-23
Quote from: bigsofty on 2010-Apr-23Is it possible to have a "console only" version for the iPhone?

It would be hard to implement a console mode on a platform that does not have console capabilities.  Not to mention incurring the wrath of Apple.
Title: Re: iPhone Console Version
Post by: trucidare on 2010-Apr-23
what is double defined?
paste the output.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-23
Code (glbasic) Select
ld: duplicate symbol alBufferDataStaticProc(int, int, void*, int, int)in /Volumes/Coding Folder/Projects/GLBasic/medsim3/XCode/GLBasic/Lib/libX3DLib.a(audiomanager.o) and /Volumes/Coding Folder/Projects/GLBasic/medsim3/XCode/GLBasic/Lib/libGLBasiciPhone-egl.a(iPhoneSoundEngine.o)
    collect2: ld returned 1 exit status
    Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1


Unfortunately I dont have access to the internal builds of either, "audiomanager.o" or "iPhoneSoundEngine.o"
Title: Re: iPhone Console Version
Post by: trucidare on 2010-Apr-23
ask kittie for renaming this function.
or compile your engine new with different name

or undef in main whatever.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-24
OK, thanks for that Truci, I've gotten the original author to rename the call.

I've got the rest of the weekend to try this out before Gernot comes back on Monday.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-25
OK, with a little(lot of) patience, I've finally gotten the external lib to link and compile into my GLB XCode project, only problem is that the initialisation of the new 3D Lib needs access to the Application Delegate file, which GLB does not seem to use?

Any suggestions?

P.S. Please feel free to move this thread to a more appropriate forum.
Title: Re: iPhone Console Version
Post by: trucidare on 2010-Apr-25
yourDelegate *myappDelegate = [[UIApplication sharedApplication]delegate];

have fun
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-25
Thanks, nice tip, trying it now.  ;)

Edit: Little problem encountered, waiting for an update from the authors site.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-26
Well, I have this working, in a basic form.

I would still like the ability to say "GLBasic, don't use initialise OpenGLES" or "GLBasic, don't initialise OpenAL", as I now have two engines running at  once, which is a little uncomfortable to say the least.

Once I get the full headers converted and all of the bugs ironed out, I'll publish them here.
Title: Re: iPhone Console Version
Post by: codegit on 2010-Apr-26
If this is the 3d lib I think it is, then this will be fantastic add on for GLBASIC.  8)
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-26
;) hopefully!
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-28
Bah, run into sound problems now, the new OpenAL library clashes with the GLB one, I would like to re-iterate my request for a 'basic' version of GLBasic that only translates from Basic to C, without the various addon multimedia libraries. It would make the option of adding libraries to GLB much easier.
Title: Re: iPhone Console Version
Post by: Kitty Hello on 2010-Apr-29
Why would you want another sound library?
I can rename these functions if you wish. I don't really see the point, though.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-29
I am trying to use this, http://xors3d.com/ixors3d , with GLBasic.

I currently have it running on the iPhone, compiled with GLBasic but both are trying to initialise an OpenAL context, which is causing problems.

iXors3D would add a lot features to the GLBasic iPhone development chain and allow for Blitz3D programmers, to smoothly move into iPhone development using GLBasic.

Like I have said, I have already managed to get it to compile, link and run but I have no control over what runs from within GLBasic.
Title: Re: iPhone Console Version
Post by: Kitty Hello on 2010-Apr-29
OK, I'll wrap mine in the __GLBASIC__ namespace then.
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-29
Thanks Gernot, I appreciate you giving it a go.  ;)
Title: Re: iPhone Console Version
Post by: codegit on 2010-Apr-30
Gernot, thanks. I think that being able to use iXors3d from GLBASIC is a big plus.  =D
Title: Re: iPhone Console Version
Post by: bigsofty on 2010-Apr-30
Update.

The programmer of iXors3D has added a 'remove all existing OpenAL contexts' function to his OpenAL initialisation. This seems to work fine, no OpenAL clashing errors yet (still testing). So, there may be no need to change anything Gernot. Thanks for the offer.

@CodeGit, would you be interested in testing? If so, PM me your email address please.
Title: Re: iPhone Console Version
Post by: codegit on 2010-Apr-30
Yes definitely interested. I will send PM.  :good: