Libraries and executables

Just starting out? Need help? Post your questions and find answers here.
Raymund
New User
New User
Posts: 8
Joined: Sat Jun 12, 2004 1:20 pm
Location: Schweinfurt, Germany.

Libraries and executables

Post by Raymund »

Gentlemen,

i am a bit of a slow learner, so forgive this obviously silly question. I have the TOPOS version of PureBASIC and will soon upgrade.

My question is; I see executables and i see libraries and they both have the same name. This means 2DDrawing.pb has an accomponying 2Ddrawing library file, but i see no calling of the Library file in the executable. How come? What is the library file there for then, if no call is made to it?

Thank you in advance.


Raymund :D
Raymund Augustine
"- always come back to the simple....-"
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

The .pb's are only example files that show how to use the most important commands of a library.
The librarys, or better: the commands stored in the libraries are linked in the executable at compiletime. All you have to do is use the commands. The PB-Compiler recognises this and does the rest for you, no need to declare the functions as PB knows them already (as long as the libs are all in the appropriate folders).
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

If you take a closer look at the 2DDrawing.pb file you will see it makes use of lots of 2DDrawing lib commands. Like freedimension says you dont have to do anything to declare that you want to use commands from any lib, you just use them, then they are included automagically into your final exe. 2DDrawing.pb is purely an example on some 2DDrawing commands.
--Kale

Image
Post Reply