Library creation - which is the best choice?

Just starting out? Need help? Post your questions and find answers here.
Hatonastick
Enthusiast
Enthusiast
Posts: 149
Joined: Wed Apr 27, 2005 11:50 am
Location: Adelaide, Australia
Contact:

Library creation - which is the best choice?

Post 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.
Hatonastick
Enthusiast
Enthusiast
Posts: 149
Joined: Wed Apr 27, 2005 11:50 am
Location: Adelaide, Australia
Contact:

Post 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. :)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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!
I may look like a mule, but I'm not a complete ass.
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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:
El_Choni
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

for sure
Tailbite from El_choni is what you want :D
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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
I may look like a mule, but I'm not a complete ass.
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

tailbite kicks as$ ..
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ladybridge
New User
New User
Posts: 3
Joined: Fri Apr 29, 2005 3:23 pm

Post by ladybridge »

I urgently need a Linux version of this really important tool. Does it exist?
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post 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 :)
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

We hope for that
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post 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
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post 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.
Post Reply