Page 1 of 1

how to distribute "library"

Posted: Fri Nov 28, 2014 4:31 pm
by juankprada
What would be the best or recommended way to distribute a library? as a UserLib? just provide the .pb files along with anything else needed?

Just wondering how people do it here

Re: how to distribute "library"

Posted: Fri Nov 28, 2014 8:49 pm
by idle
If you've written your lib in PB then I think the best way is to either make a dll and supply a import .pbi
or better supply it as source wrapped in a module.
PB's userlibs are in sparse / thin static lib format so if you've made it via Tailbite it would likely need
to be recompiled with each PB update since the sparse format depends on the current pb versions objects.

Re: how to distribute "library"

Posted: Sat Nov 29, 2014 7:52 am
by mestnyi
I think the best way is to either make a dll and supply a import .pbi
or better supply it as source wrapped in a module.
"make a dll" is for windows
"import .pbi" it through inklude
"wrapped in a module" is like?

Re: how to distribute "library"

Posted: Sat Nov 29, 2014 10:42 am
by idle
mestnyi wrote:
I think the best way is to either make a dll and supply a import .pbi
or better supply it as source wrapped in a module.
"make a dll" is for windows
"import .pbi" it through inklude
"wrapped in a module" is like?
PB produces either a dynamic link library, shared object or dylib dependent on platform and it they will work with any version of PB
unlike the PB userlibs format which are sparse or thin static libraries and generally require recompiling with each new version of PB

yes if you make a library your going to write an include to import the functions

If you wrap your source in a module it prefixes all the symbols in a name space so they won't conflict with other user code.