USERLIBS,DLL's, I'm confused..

Blitz3D Forums/Blitz3D Beginners Area/USERLIBS,DLL's, I'm confused..

Yahfree(Posted 2007) [#1]
Hey, i'm new to the world of programming, i'm trying to figure out what a userlib, DLL, and stuff like that is... how do they work, and what are they? i'm looking at tomaka (spell check?) i want to know what this will do and how does it work with blitz3d?


b32(Posted 2007) [#2]
a dll=dynamic link library That is a set of functions that can be called from a windows executable. I suppose it is some form of executable itself, only the functions have a standard calling method.
http://en.wikipedia.org/wiki/Dynamic_link_library
Windows has a lot of standard dll's. DirectX uses dll's. And you can write dll's yourself with for instance c++.

A userlib is a .dll that can be called from Blitz. You need to supply a .decls file yourself that defines what function the dll contains.
http://www.blitzbasic.com/sdkspecs/sdkspecs/userlibs_specs.txt
The archive has a userlibs section:
http://www.blitzbasic.com/codearcs/codearcs.php?cat=14

Tokamak is a physics library, that allows you to more easily add physics to your game, such as gravity, collisions, pushing objects etc.
http://www.freewebs.com/sweenie/


Floyd(Posted 2007) [#3]
As a new programmer you can defer thinking about these for a long time and concentrate on the fundamentals.

The idea of a userlib/DLL is to extend Blitz with new commands, which can be used as if they were built into the language. If someone created the DLL specifically for use with Blitz then it should be fairly easy to use.

The more challenging case is when the DLL was created for some other language, but you want to make it work with Blitz. This can range from easy to difficult to just about impossible.


jfk EO-11110(Posted 2007) [#4]
One FAQ thing: When you download demos and sources that contain a *.decls file, you have to copy the file to the "userlibs" folder in your blitz installation path. The *.DLL files in the demo must be copied to the folder containing the demos' sourcecode.