Please enable JavaScript to view this site.

ESL Documentation

With the common use of Integrated Development Environments, such as Visual Studio, the compiling and linking of DLL and other external routines, is simply the pressing a function key (e.g. F7). To create a project within Visual Studio, there is a Wizard. The Wizard is initiated by selecting the Menu options:

File -> New -> Project From Existing Code...

Ensure the type of project is set to C++, then press next,

Navigate to where the Source Code is located and Name the Project, then press next,

Select the Project Type as "Dynamically Linked Library" and press Finish.

 

If your Library calls any the ESL functions, which are declared in the EslLib header file, in addition to including the header, with the compiler directive:

#include "EslLib.h"

You will need set the Include and Lib paths, which in the current version of Visual Studio are stored as properties of the Project. We recommend the installed macro "$(ESL_Install)" to ensure Visual Studio accesses the correct directory, e.g.

$(ESL_Install)\include and

$(ESL_Install)\lib

 

(Note. The above paths apply to "All Configurations")

There are further settings that need to be applied to the Linker, which are in the Input section of the Linker properties:

Additional Dependencies add "EslLib.lib", otherwise there will be unresolved linkage errors.

Module Definition File include the file name of the location of the required external entry points, which is need to ensure the exposed names are not decorated, so can be access from the ESL host program.

The recommended settings for compiling an ESL DLL within Visual Studio are

 

for Release

 

/nologo /MD /W3 /GX /Ob1 /D "_WINDLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp".\Release/Example.pch" /YX /Fo".\Release/" /Fd".\Release/" /c

 

for Debug

 

/nologo /MDd /W3 /Gm /GX /Zi /Od /D "_WINDLL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp".\Debug/Example.pch" /YX /Fo".\Debug/" /Fd".\Debug/" /c

 

The link line used is also specific:

 

For release

link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib esllib.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\Example.pdb" /machine:I386 /def:".\EXAMPLE.DEF" /out:"$(OUTDIR)\Example.dll" /implib:"$(OUTDIR)\Example.lib" /libpath:"$(ESL_Install)\lib"

 

For debug

link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib esllib.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\Example.pdb" /debug /machine:I386 /def:".\ EXAMPLE.DEF" /out:"$(OUTDIR)\Example.dll" /implib:"$(OUTDIR)\Example.lib" /libpath:"$(ESL_Install)\lib"

 

Note the module is named EXAMPLE.C and the library will be called EXAMPLE.DLL. If you want to use any ESL string variable manipulation DLL routines, esllib must be included in the list of libraries, as above. When any ESL library has been included, you must set the libpath to the lib directory found within the main ESL installation directory.