Page 1 of 1
can PB create LINUX shared objects or MacOSX dylibs?
Posted: Tue Jun 17, 2008 11:01 am
by Rozek
Hello!
The question comes up from time to time in this forum - and sometimes the answer is not a complete "no", although there is never an explanation of how a "yes" could look like...
Thus: is it possible to create .so files for Linux or .dylib files for MacOSX in a similar way as one can create .dll files for Windows?
One could then implement functions using PB and make them available to other languages and environments.
Thanks in advance for any hint!
Kind regards,
Andreas Rozek
Posted: Tue Jun 17, 2008 11:08 am
by Foz
You did check the Compiler Options screen where you select the type of executable didn't you?
Posted: Tue Jun 17, 2008 11:15 am
by Rozek
oops,
I was so fixed to looking into the forum first that I forgot to experiment with PB under MacOS X first...
Thanks for the hint and "mea culpa".
Sorry for bothering you!
Posted: Tue Jun 17, 2008 11:16 am
by Foz
Don't worry, it happens to the best of us

Posted: Thu Dec 04, 2008 3:01 pm
by Rozek
Hello again!
Today, after several other projects I found some time to test building dynamically loadable libraries under Mac OS X.
However, I failed - here are my results
- the current "official" version produces a shared object, however, this library does not contain the symbol I tried to export
- the current "beta 4" simply emits a "linker error"
- "beta 5" complains about a missing "_main" symbol
Does anybody have any idea how I can build (the equivalent of) DLLs under Mac OS X (and, later, Linux)?
Thanks in advance for any help!
Posted: Thu Dec 04, 2008 3:56 pm
by Rozek
Hmm, strange...
By "playing around" with the creation of "shared objects" under Mac OS X (Version 4.20) I found out:
- the given function names are never exported
- instead, PB exports the following symbols
- PS#, _ClearLoop# and _Procedure# with # = 0,2,4, ...
- _EndProcedure# with # = 0,1,2,3...
Let "n" be the number of functions to be exported, then
- the first series stops at 2*(n-1)
- the second series stops at 2*(n-1)+1
This looks really strange - does anybody have an explanation?
Posted: Thu Dec 04, 2008 7:09 pm
by Trond
I have, i have! Look at me! Look at me!
What I remember (to be confirmed by Fred):
Actually, it's broken for OS X at the moment. For Linux it should work.
Posted: Fri Dec 05, 2008 7:21 am
by Rozek
oops,
that's bad - is there any information when it will work (again)?
Posted: Fri Dec 05, 2008 2:22 pm
by Fred
Trond is right, dylib on OS X doesn't work for now. It's planned for 4.40.
Posted: Sat Dec 06, 2008 8:51 am
by Rozek
Thanks for the response!
Hmmm, this means that it will take a while...we are currently within the beta process of 4.30.
Kind regards,
Andreas Rozek
Posted: Wed Jan 28, 2009 5:35 pm
by Niffo
Hello,
Please Fred, can you tell us what is really non-functional in Mac Version of PB :
- the generation (compilation) of dynlibs by PB
- the use of dynlibs (made in C for example) from PB ?
- both ?
Regards
Posted: Wed Jan 28, 2009 7:32 pm
by Trond
It's probably only the generation, anything else would be stupid.
Posted: Sat Jan 31, 2009 6:41 pm
by Fred
Yes, it's only the generation from PB code.
Posted: Mon Feb 02, 2009 10:40 am
by Niffo
Thank you very much Fred for your answer