conv

Introduction

conv is a program which is used when building DLL's. I converts a file with details of the routines which have to be accessable and builds a library file and a file which is necessary to do the linking.

Contrary to gendllib, this program builds a library in which all the routines are always linked. This is the easiest method of DLL linking and most user friendly. It can however uses a bit more space than is necessary when linking with large libraries which are not completely used.

This program build two files, filename-dll_s and filename-lib_s. The first (when compiled) has to be included and contains the DLL linkage structure. This is usually copied to libname_a to be used as library file. The latter file is used by the code which will do the linking. It contains the actual links, and only requires copying.

Usage

conv filename
filename
The name of the file (excluding _dll extension) which has to be treated. The file will be searched on the data default device (cfr DEVDataGet). The output files will be filename-lib_s and filename-dll_s.

File format

The file format is line oriented. The first three lines have a special meaning.

The first line contains the name of the thing extension which will link this library (maximum four letters). The actual name of the thing should be given on the next line.

The third line contains the version identifier for the library linkage. This identifier only has to be modified when routines are deleted, replaced or removed. When new routines are added, the version can stay the same.

All the following lines contain the names of routines which have to be linked. You just have to give the name of the routine. (The starting underscore is added by conv). When lines are added to the file, the library will still be compatible with the previous (and version numbers can be retained).

For example, the ProWesS DLL linkage file looks as follows :

CORE
ProWesS
v1
PWpixel2point
PWpoint2pixel
PWHandleKeyPress
PWGetType
PWSkipTag
PF2xpix
PF2ypix
xpix2PF
ypix2PF
PFxround
PFyround

And it is used in the makefile using the following lines :

pws-lib_o pws-dll_o : pws_dll
    conv pws
    cc -c pws-lib_s
    cc -c pws-dll_s
    rm pws-dll_s pws-lib_s

win1_c68_lib_libpw_a : pws-dll_o
    cp pws-dll_o win1_c68_lib_libpw_a

PROGS, Professional & Graphical Software
last edited February 7, 1996