GLBasic forum

Main forum => GLBasic - en => Topic started by: r0ber7 on 2016-Apr-04

Title: Mac program compiles succesfully, fails at runtime.
Post by: r0ber7 on 2016-Apr-04
Code (glbasic) Select
> open ~/RWI/Hello_world.app/
LSOpenURLsWithRole() failed with error -10810 for the file /Users/r0ber7/RWI/Hello_world.app.


This is from the Mac commandline. I have compiled this:

Code (glbasic) Select

// Auf Back-Buffer schreiben / Write to back buffer
PRINT "Hello GLBasic World !", 0, 100;
// Back Buffer anzeigen      / Show back buffer
SHOWSCREEN
// Auf Maustaste warten      / Wait for mousekey
MOUSEWAIT


I had hoped upgrading to El Capitan would save this problem, but it hasn't. Any ideas on how to tackle this?

:giveup:

Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: MrTAToad on 2016-Apr-10
Dont know that one, but does it work from the desktop ?
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: r0ber7 on 2016-Apr-12
Yes. It could have to do with Virtualbox, but since it compiles fine I'm kind of in the dark as to what to do about it. I haven't found any good info on that error code either. :/
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: MrTAToad on 2016-Apr-13
Might be worth asking about the error code on a Mac forum - I have a feeling it is a security error code...
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: spacefractal on 2016-Apr-13
permission issue? im havent checked out.
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: MrTAToad on 2016-Apr-15
Or it could be due to the location download security message (like in Windows)...
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: r0ber7 on 2016-Apr-19
I open it from the cli.

Code (glbasic) Select
MacBook-Pro-2:RWI robertvanengelen$ open Hello_world.app/
LSOpenURLsWithRole() failed with error -10810 for the file /Users/robertvanengelen/RWI/Hello_world.app.
MacBook-Pro-2:RWI robertvanengelen$ sudo chmod a+rwx ./Hello_world.app/
Password:
MacBook-Pro-2:RWI robertvanengelen$ open Hello_world.app/
LSOpenURLsWithRole() failed with error -10810 for the file /Users/robertvanengelen/RWI/Hello_world.app.


I'll take your advice and register on a Mac forum.
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: MrTAToad on 2016-Apr-19
According to https://github.com/atom/atom/issues/3093 (https://github.com/atom/atom/issues/3093), it could be some sort of permission error.
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: r0ber7 on 2016-Apr-19
And yet I have repeatedly, and recursively, set permissions for everyone to run it:

Code (glbasic) Select
sudo chmod -R a+rwx ./Hello_world.app/

I think it's some kind of Mac specific thing. One thing I noticed is, there used to be two options to compile for Mac (I think x86 and universal), now I have only one? I wonder if I have to compile with the other one, or if the Virtualbox complicates matters.  :doubt:
Title: Re: Mac program compiles succesfully, fails at runtime.
Post by: spacefractal on 2016-Apr-20
Also Apple does not support universal apps for many many years ago.... That platform should been removed to avoid confuction. Im thinks its was back to Lion its got removed. So only uses x86, which should works. not universal.