This wiki is out of date, use the continuation of this wiki instead

DLL

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:54, 13 April 2007 (edit)
86.136.63.228 (Talk)

← Previous diff
Revision as of 15:24, 29 April 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 1: Line 1:
[[Category:dll]] [[Category:dll]]
-DLL stands for "Dynamic Linked Library". It is a filetype used by windows to extend applications (such as [[Fenix]]), and it logically descirbed by windows as an "application extension". These DLLs can be included in your [[Fenix]] programs as and when you wish, or not at all.+DLL stands for "Dynamic Linked Library". It's a filetype used by windows to extend applications (such as [[Fenix]]), and is logically described by windows as an "application extension". These DLLs can be included in your Fenix programs as and when you wish, or not at all.
-==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 [[Network_DLL|Network.DLL]].
-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]] 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).+
- +
-==Using A DLL==+
 +== 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]]. 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:+First, to use the [[functions]] of any DLL you need to include this line in your code:
-<pre>import "*Path and file name of DLL here*";</pre>+Many DLL's require you to import them, like so:
-Once successfully included, and [[functions]] of that DLL can then be used in the rest of your program in the same way that [[Fenix]] [[functions]] are used.+<pre>import "<Path and file name of DLL here>";</pre>
-Some DLLs (especially the ones included in the [[Fenix]] releases require other DLLs to be present in the same folder. This is normally because they use some [[SDL]] functionality that requires the appropriate [[SDL]] DLL. +Although there are some, like Network.DLL, which require you to include a [[Fenix header]] file, instead of importing the DLL. The header file will do that and possibly provide more functionality.
-For example, when including the [[ttf DLL]] (supplied with [[fenix]]) which enables TrueType font support, firstly you need to find the file named "ttf.dll" in the directory (or subfolders) to which you saved [[Fenix]] (for [[0.84a]] the filepath is "\dll\ttf\bin") and copy "ttf.dll" to where you want your game to access it (often the same folder as the game file itself). Then go back to where you found [[ttf DLL]] and copy over the file named "freetype.dll" into the SAME DIRECTORY as [[ttf DLL]] (it needs to be the same directory, not a subfolder or anywhere else). Once you have copied over the two files, simply add this line into your fenix code:+
-<pre>import "ttf.dll";</pre>+
-and you're away, you can then use any functions related to [[ttf DLL]]. Note that the "freetype.dll" is neccessary for [[ttf DLL]] to work, but does not need to be imported into your fenix code.+
-==DLLs and Game Releases==+Once successfully imported, 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 (especially the ones included in the Fenix releases) require other DLLs to be present in the same folder. This is normal because they use some [[SDL]] functionality that requires the appropriate SDL DLL.
-When it comes to the point when you want to distribute your game to others, it is neccesary 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]].+For example, when including the [[ttf DLL|ttf.DLL]] (supplied with Fenix) which enables TrueType font support, first you need to find the file named "ttf.dll" in the directory (or subfolders) to which you saved Fenix (for Fenix 0.84a the filepath is "\dll\ttf\bin") and copy "ttf.dll" to where you want your game to access it (often the same folder as the game file itself). Then go back to where you found ttf.DLL and copy the file named "freetype.dll" into the ''same directory'' as ttf.DLL (it needs to be the same directory, not a subfolder or anywhere else). Once you have copied the two files, simply add this line into your fenix code:
 +<pre>import "ttf.dll";</pre>
 +and you're away, you can then use any functions related to ttf.DLL. Note that the "freetype.dll" is neccessary for ttf.DLL to work, but does not need to be imported into your fenix code.
-==Links==+== 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]].
-[[List of Fenix DLLs]]+== Links ==
 +* [[List of Fenix DLLs]]
 +* [[:Category:dll|DLL category]] for a list of DLL's on FenixWiki

Revision as of 15:24, 29 April 2007


DLL stands for "Dynamic Linked Library". It's a filetype used by windows to extend applications (such as Fenix), and is logically described by windows as an "application extension". These DLLs can be included in your Fenix programs as and when you wish, or not at all.

Contents

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 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).

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, instead of importing the DLL. The header file will do that and possibly provide more functionality.

Once successfully imported, 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 (especially the ones included in the Fenix releases) require other DLLs to be present in the same folder. This is normal because they use some SDL functionality that requires the appropriate SDL DLL.

For example, when including the ttf.DLL (supplied with Fenix) which enables TrueType font support, first you need to find the file named "ttf.dll" in the directory (or subfolders) to which you saved Fenix (for Fenix 0.84a the filepath is "\dll\ttf\bin") and copy "ttf.dll" to where you want your game to access it (often the same folder as the game file itself). Then go back to where you found ttf.DLL and copy the file named "freetype.dll" into the same directory as ttf.DLL (it needs to be the same directory, not a subfolder or anywhere else). Once you have copied the two files, simply add this line into your fenix code:

import "ttf.dll";

and you're away, you can then use any functions related to ttf.DLL. Note that the "freetype.dll" is neccessary for ttf.DLL to work, but does not need to be imported into your fenix code.

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.

Links

Personal tools