Downloading the DCL
If you haven't already done so, either download the DCL or (preferably) clone the repository using GitHub for Windows.
You'll now have a directory tree that looks something like this:
You won't see the .git directory unless you have Explorer configured to show hidden files/folders, and you won't see the green check marks unless you have TortoiseGit installed (but that's another story, and TortoiseGit isn't a requirement here).
The RED file: To modify, or not to modify
In order to use the DCL files you need to find some way of getting those files into Clarion's field of view. You have two choices:
- Copy the files to the appropriate Clarion directories
- Modify Clarion's redirection file to include the appropriate DCL directories
I favor the latter approach because it means that Clarion is always using the latest DCL files.
There are four lines that have to be modified in the Clarion80.red file (which you can find in Clarion's bin directory). Here are what the changes look like in my RED.
To update your RED file:
- Add a semicolon followed by the path to the DCL template directory to the end of the *.tp? line.
- Add a semicolon followed by the path to the DCL bin directory to the end of the *.dll line.
- Add a semicolon followed by the path to the DCL lib directory to the end of the *.lib line.
- Add a semicolon followed by the path to the DCL libsrc directory to the end of the . line
I should probably write a utility to update the RED.
Using the library
There are two ways to use the classes; you can compile the source code, or you can use use the precompiled DLL.
In either case, to make use of any of the classes you need to include the appropriate .INC file somewhere in your source, e.g.
Include('DCL_System_String.inc'),once
Make sure you use the ,ONCE attribute.
By default DCL assumes you want to use the supplied DLL, so you'll need to add DevRoadmapsClarion.lib to your project. If you don't do this you'll get any number of unresolved external error messages.
If you want to compile the classes
If you want to compile the classes you won't need the LIB and DLL, but you will need to set a compile pragma in your project properties:
_Compile_DCL_Class_Source_=>1