can PB create LINUX shared objects or MacOSX dylibs?
can PB create LINUX shared objects or MacOSX dylibs?
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
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
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!
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!
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?
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?