What is compiled?

Everything else that doesn't fall into one of the other PB categories.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

What is compiled?

Post by Moonshine »

Hi I was just wondering, when an exe is compiled, are the entire contents of a PBLib/Userlib compiled if only one or two commands from that lib are used? Or does it only use the ones that are called?

Just one of those questions thats pestering me at the back of my head :)
Mark my words, when you least expect it, your uppance will come...
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

i think it depends on the lib, for example the lib MathExtras by El_Choni
will only export the functions that are used in the program. :|
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

PB libs are splitted, so only the used commands are included,
for the userlibs, it depends on wether they were written to support that or not.

Timo
quidquid Latine dictum sit altum videtur
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

for the userlibs, it depends on wether they were written to support that or not.
In laymans terms how would you write a lib to support this?
--Kale

Image
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Good question Kale :twisted:
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

i think you need to compile each function in your lib separtely into obj files, then invoke lcclib (or equivalent) to build a lib file.
then you run LibraryMaker (Library SDK folder) to make a PB lib. :)
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

Thanks for the replies :)
Mark my words, when you least expect it, your uppance will come...
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Kale wrote:
for the userlibs, it depends on wether they were written to support that or not.
In laymans terms how would you write a lib to support this?
... use Tailbite and let it take care of it for you :)

Actually you have to put every function into a seperate .obj file, and combine
them into a .lib file, as jack has allready said, that's all.


Timo
quidquid Latine dictum sit altum videtur
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

... use Tailbite and let it take care of it for you
he he :)

Thanks Timo/Jack.
--Kale

Image
Post Reply