A tailbite / polink / polib question!

Everything else that doesn't fall into one of the other PB categories.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

A tailbite / polink / polib question!

Post by srod »

Hi,

Something about Tailbite is puzzling me a little. I will pick on Gnozal's PureZIP user library as an example as I know it imports an external library : ZLIB in this case. I guess really I should direct this query straight at Gnozal, but I thought others might be intersted in this as well. :)

If I use Tailbite to create a user library and (like PureZIP) I import functions from an external library (e.g. ZLIB) then it seems clear that I do NOT need to ship the external library (ZLIB) along with my resulting user library.

If this is correct, then I am puzzling over 'who' has grabbed the code from the external library and placed it within the Purebasic user library? Is it POLINK or Tailbite or POLIB (via LibraryMaker.exe) ? I am puzzled because I didn't think that POLINK would be involved when creating user libraries.

The reason I ask is that I'm thinking of creating a user library which will need to import functions from an external library and I just need to know where I stand with this?

Thanks.
I may look like a mule, but I'm not a complete ass.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: A tailbite / polink / polib question!

Post by gnozal »

srod wrote:If I use Tailbite to create a user library and (like PureZIP) I import functions from an external library (e.g. ZLIB) then it seems clear that I do NOT need to ship the external library (ZLIB) along with my resulting user library.
yes
srod wrote:If this is correct, then I am puzzling over 'who' has grabbed the code from the external library and placed it within the Purebasic user library? Is it POLINK or Tailbite or POLIB (via LibraryMaker.exe) ?
I would say it's the linker, but I may be wrong.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Hi Gnozal,

thanks for the reply.

Is the linker even involved when creating user libraries via Tailbite? POLINK, I believe, can only create exe's or dll's. Must admit, if it is not Tailbite itself grabbing the code from the external libraries, then I suspect it to be POLIB.

Still, at least you've confirmed that I need not ship the external .lib as well as my user library. :)
I may look like a mule, but I'm not a complete ass.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

srod wrote:Hi Gnozal,

thanks for the reply.

Is the linker even involved when creating user libraries via Tailbite? POLINK, I believe, can only create exe's or dll's. Must admit, if it is not Tailbite itself grabbing the code from the external libraries, then I suspect it to be POLIB.
Hmm...
Think ... Think ... Think ... Think ...
I think it works that way :
1. PBCOMPILER creates the EXE (using POLINK) that we don't need, but also the ASM file (/COMMENTED)
2. TAILBITE grabs the ASM file, splits it, rewrites some parts
3. FASM compiles the ASM files created by tailbite to OBJ
4. POLIB creates the LIB library from the *.OBJ files
5. LibraryMaker creates userlibrary from the LIB file
It's a team play :wink:
So it's probably more POLIB than POLINK ...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I wonder then if Tailbite is placing the name of the external .lib referenced in the Import / EndImport in the .desc file? There is something telling POLIB or LibraryMaker.exe to include some of the .obj (if not all of them) from the external .lib in the resulting library.

Ah, fascinating stuff! :)
I may look like a mule, but I'm not a complete ass.
Post Reply