how to distribute "library"

Everything else that doesn't fall into one of the other PB categories.
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

how to distribute "library"

Post 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
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: how to distribute "library"

Post 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.
Windows 11, Manjaro, Raspberry Pi OS
Image
mestnyi
Addict
Addict
Posts: 1114
Joined: Mon Nov 25, 2013 6:41 am

Re: how to distribute "library"

Post 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?
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: how to distribute "library"

Post 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.
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply