Page 1 of 1

Library creation - which is the best choice?

Posted: Thu Apr 28, 2005 5:56 pm
by Hatonastick
Hi there, I'm ultra new to PureBASIC (bought a license two days ago). I've been a programmer now for almost 20 years and this is the first time I've ever been this impressed with a development package/language.

Anyway on with my question: What is the best way, from the point of view of the user of the library, to write a library to expand the abilities of PureBASIC? ie. As a DLL and call it? As a C/C++ library and include it somehow? As a PureBASIC library (ie. written in PureBASIC itself - if this can be done - I know DLL's can be)? Some other way that I can't think of right now?

I hope I'm making sense, I'm a little tired.

Posted: Thu Apr 28, 2005 6:01 pm
by Hatonastick
This second post contained a stupid question that I just answered myself - however I would still like advice as to the above question. :)

Posted: Thu Apr 28, 2005 6:39 pm
by srod
Hi there, welcome to Purebasic.
Is it also possible to get a copy of the documentation for PureBASIC in a printable format?
The following site has a downloadable manual for version 3.72 of Purebasic. I used it to get started, although, to be honest, these forums and the various help pages are all that is really required. http://www.purearea.net/pb/english/index.htm


The format of static Purebasic libraries are such that they generally need to be coded in either C or assembly language. There are notes and examples on how to do this in the Purebasic package.
However, thanks to one registered user (El choni) we can now develop our own static libraries using Purebasic itself as easily as creating a dynamic library. Such static libraries of course extend the language. For this you require El choni's 'Tailbite' program which basically rips the assembly code output from the Purebasic compiler apart and mashes it into a static library. It is incredibly easy to use and once the library file has been created, you simply place it in the PureLibraries\UserLibraries folder and the functions within can be called like any other Purebasic command.
To download 'Tailbite', go to the website above.

Enjoy Purebasic, it's fab!

Posted: Thu Apr 28, 2005 6:56 pm
by El_Choni
It is incredibly easy to use and once the library file has been created, you simply place it in the PureLibraries\UserLibraries folder
You don't have to do that, TailBite already places the library there. Remember, TailBite is aimed to lazy people like me. :lol:

Posted: Thu Apr 28, 2005 7:14 pm
by Droopy
for sure
Tailbite from El_choni is what you want :D

Posted: Thu Apr 28, 2005 7:33 pm
by srod
TailBite is aimed to lazy people like me.
I'm too lazy to learn C which is why Tailbite is a god send! :D

Posted: Fri Apr 29, 2005 12:02 am
by NoahPhense
tailbite kicks as$ ..

Posted: Fri Apr 29, 2005 12:35 pm
by DoubleDutch
imho Fred should ask if he can include Tailbite as part of the PureBasic package - or include it within the compiler itself. It would mean Linux and possibly Mac versions however.

-Anthony

Posted: Fri Apr 29, 2005 1:32 pm
by gnozal
DoubleDutch wrote:imho Fred should ask if he can include Tailbite as part of the PureBasic package - or include it within the compiler itself. It would mean Linux and possibly Mac versions however.
-Anthony
I vote for that :D

Posted: Fri Apr 29, 2005 3:33 pm
by ladybridge
I urgently need a Linux version of this really important tool. Does it exist?

Posted: Fri Apr 29, 2005 4:11 pm
by thefool
may i ask why it really hurries? Its just making userlibs. DLL's and the linux counterpart can be done in purebasic. (probaly mac has a thing like that too, wich probaly will be included in pb package)

This tool just makes it easier for programmers to share their code [also without sharing the source!] so other purebasic users easly can intergrate the procedures of the lib as if it was just normal pb commands. This is a very nice feature and tailbite really does its job well.
about linux version, i dont think there is one atm but maybe elchoni is baking on something :)

Posted: Fri Apr 29, 2005 5:10 pm
by Progi1984
We hope for that

Posted: Fri Apr 29, 2005 6:33 pm
by jack
ladybridge wrote:I urgently need a Linux version of this really important tool. Does it exist?
kake26 made a lib for linux using free pascal. viewtopic.php?t=9379

Posted: Wed May 04, 2005 9:23 pm
by GedB
You're not limited to C and Assembler. Any language that can produce a .OBJ file will do.

Take a loot in the [...]\PureBasic\Library SDK folder for full details.