Page 1 of 1

libraries

Posted: Wed Jun 29, 2005 11:56 pm
by sid6.7
noob question...

okay i still aint ready for the next level
i'll still be a text mode person for a bit
but i see all this stuff about libraries....

what do they do? and how do you use them?
is it something where its a cut and paste
code from the library into your program?
or something more involved...

try not to laugh.... :)

Librarys

Posted: Thu Jun 30, 2005 12:32 pm
by Y-12
Librarys are like DLLs. Librarys do thing for another program. Its kind of hard to explain. I suggest that you read some tutorial on librarys.

A good tutorial to explain librarys is at <a href="http://www.ascii-world.com/">ascii-world</a>. Go to Beginner's Level and click on Lurah's Getting Familiar With Libraries. That should help.

?Y-12

Posted: Thu Jun 30, 2005 1:46 pm
by Guest
Here's my experience with libraries used with QuickBasic:

Libraries are a collection of routines which can be incorporated into your program at LINK time.

Let's say you have a routine or function which you find yourself using in different program very often. In order not to have to copy/paste them into each program, one way is to use the $INCLUDE. This includes or copies the named file contents into your program. This is an old technique, which in COBOL is callled a COPYFILE.

Another way to be able to include the routine is to put it on a library. You can put a whole bunch of your common routines on this library. Then when you compile and link you specify the name of the library. Your program declares and references the routine or function, and the LINK will include the corresponding OBJECT CODE for the routine/function.

The big advantage to using a library is that you can obtain (or write) libraries that contain assembly language functions. You declare and reference the function in your program, specify the library to the link, and poof you now will execute an assembly language function. For QB or QuickBasic, this is very powerful, enabling you to do stuff that you otherwise could not do (or don't know how).

Maintenance of libraries is not that easy, however. You should have a proper manual.
*****

Posted: Thu Jun 30, 2005 1:48 pm
by moneo
The above post re libraries was submitted by me.
Don't know why the login is being dropped.
*****

Posted: Thu Jun 30, 2005 2:42 pm
by guest
thanks guys good help...

Posted: Sun Jul 03, 2005 3:00 pm
by {Nathan}
Plus... it doesn't really matter, with SDL, OpenGL, GFXlib, and all of those windows - based things, it doesn't really matter.