- This wiki is out of date, use the continuation of this wiki instead
DLL
From FenixWiki
Revision as of 22:06, 1 October 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (16:07, 19 March 2008) (edit) (undo) Sandman (Talk | contribs) |
||
(One intermediate revision not shown.) | |||
Line 1: | Line 1: | ||
- | DLL stands for " | + | DLL stands for "Dynamically Linked Library". It's a filetype used to extend applications (such as [[Fenix]]), and is logically described as an "application extension" or, because different programs can make use of it, as a "shared object". These DLLs can be included in your Fenix programs as and when you wish, or not at all. In Windows DLLs have the extension .DLL (Dynamic-Link Library) and in Linux .SO (Shared Object). |
To view a list of documented DLL's, see [[DLLs]]. | To view a list of documented DLL's, see [[DLLs]]. | ||
- | Want to create | + | Want to create DLLs? Check [[Making_DLLs|this]] out. |
== What does this mean for Fenix? == | == What does this mean for Fenix? == | ||
- | It means that people who are not developing the Fenix language can still add to it by writing DLL's for Fenix in C. These add optional extra functionality for the Fenix language through the use of some DLLs. For example, if you want to add internet/network functionality to your games, there is [[ | + | It means that people who are not developing the Fenix language can still add to it by writing DLL's for Fenix in C. These add optional extra functionality for the Fenix language through the use of some DLLs. For example, if you want to add internet/network functionality to your games, there is [[Network.DLL]]. |
- | To use a DLL in Fenix it must first have been compiled for the version of Fenix that you are using. Most DLLs for Fenix have been pre-compiled for use with Fenix [[0.84a]] and therefore require you to use that version Fenix (else you get a cryptic Spanish [[error message]]). However most DLLs also come with source code supplied and therefore you are able to [[compile DLL]]s for any Fenix version that you want to use (if you know how to). | + | To use a DLL in Fenix it must first have been compiled for the version of Fenix that you are using. Most DLLs for Fenix have been pre-compiled for use with Fenix [[0.84a]] or [[0.92a]] and therefore require you to use that version Fenix (else you get a cryptic Spanish [[error message]]). However most DLLs also come with source code supplied and therefore you are able to [[compile DLL]]s for any Fenix version that you want to use (if you know how to). |
== Using a DLL == | == Using a DLL == | ||
Line 16: | Line 16: | ||
Many DLL's require you to import them, like so: | Many DLL's require you to import them, like so: | ||
<pre>import "<Path and file name of DLL here>";</pre> | <pre>import "<Path and file name of DLL here>";</pre> | ||
- | Although there are some, like Network.DLL, which require you to include a [[ | + | Although there are some, like Network.DLL, which require you to [[include]] a Fenix Header file (*.[[FH]]), instead of importing the DLL. The header file will do that and possibly provide more functionality. |
- | Once successfully imported, | + | Once successfully imported or included, [[function]]s of that DLL can then be used in the rest of your program in the same way that Fenix functions are used. |
- | Some DLLs | + | Some DLLs require other DLLs to be present in the same folder. This is possible because DLLs for Fenix can make use of functionality of other DLLs, like Network.DLL uses SDL_Net.DLL. |
- | For example, when including the [[ | + | For example, when including the [[GUI.DLL]] (supplied with Fenix 0.84a) which enables [http://en.wikipedia.org/wiki/TrueType TrueType] font support, first you need to find the file named "gui.dll" in the directory (or subfolders) to which you saved Fenix (for Fenix 0.84a the filepath is "\dll\gui\bin") and copy "gui.dll" to where you want your game to access it (often the same folder as the game file itself). Then simply add this line into your Fenix code: |
<pre>import "ttf.dll";</pre> | <pre>import "ttf.dll";</pre> | ||
- | and you're away | + | and you're away. You can then use any function provided by gui.dll. |
== DLLs and game releases == | == DLLs and game releases == | ||
Line 30: | Line 30: | ||
== Links == | == Links == | ||
* [[List of Fenix DLLs]] | * [[List of Fenix DLLs]] | ||
- | * [[ | + | * [[DLLs|List of DLLs]] |
Current revision
DLL stands for "Dynamically Linked Library". It's a filetype used to extend applications (such as Fenix), and is logically described as an "application extension" or, because different programs can make use of it, as a "shared object". These DLLs can be included in your Fenix programs as and when you wish, or not at all. In Windows DLLs have the extension .DLL (Dynamic-Link Library) and in Linux .SO (Shared Object).
To view a list of documented DLL's, see DLLs.
Want to create DLLs? Check this out.
Contents |
[edit] What does this mean for Fenix?
It means that people who are not developing the Fenix language can still add to it by writing DLL's for Fenix in C. These add optional extra functionality for the Fenix language through the use of some DLLs. For example, if you want to add internet/network functionality to your games, there is Network.DLL.
To use a DLL in Fenix it must first have been compiled for the version of Fenix that you are using. Most DLLs for Fenix have been pre-compiled for use with Fenix 0.84a or 0.92a and therefore require you to use that version Fenix (else you get a cryptic Spanish error message). However most DLLs also come with source code supplied and therefore you are able to compile DLLs for any Fenix version that you want to use (if you know how to).
[edit] Using a DLL
Each DLL may have different functionality, so it is always advisable to read the documentation that comes with the DLL (if there is any) or the page on that DLL on this wiki: List of Fenix DLLs.
First, to use the functions of any DLL you need to include this line in your code: Many DLL's require you to import them, like so:
import "<Path and file name of DLL here>";
Although there are some, like Network.DLL, which require you to include a Fenix Header file (*.FH), instead of importing the DLL. The header file will do that and possibly provide more functionality.
Once successfully imported or included, functions of that DLL can then be used in the rest of your program in the same way that Fenix functions are used. Some DLLs require other DLLs to be present in the same folder. This is possible because DLLs for Fenix can make use of functionality of other DLLs, like Network.DLL uses SDL_Net.DLL.
For example, when including the GUI.DLL (supplied with Fenix 0.84a) which enables TrueType font support, first you need to find the file named "gui.dll" in the directory (or subfolders) to which you saved Fenix (for Fenix 0.84a the filepath is "\dll\gui\bin") and copy "gui.dll" to where you want your game to access it (often the same folder as the game file itself). Then simply add this line into your Fenix code:
import "ttf.dll";
and you're away. You can then use any function provided by gui.dll.
[edit] DLLs and game releases
When it comes to the point when you want to distribute your game to others, it is necessary to distribute it with all of the DLLs used, including the ones that are not directly imported into your code (see above). Lack of any DLLs used will make your game unplayable. For more information see Distributing Fenix Programs.