# dklibs 1.26.0

- Overview
- Download
- Download / Installation
- Installation from source on Windows systems
- Usage
- FAQ
- Change log
- Other projects
- Tutorial
- Developer docu
- stc
- tracecc and trana
- tracecc GUI
- tracecc PDF man.
- API: sort and search
- API: Generic I/O
- Preferences
- File search
- Font configuration
- LaTeX encodings
- Security

- Overview
- About this document
- Required compilers and software
- Downloading the source code
- Runtime library versions in MSVC
- Installation process overview
- Choosing a runtime library
- Installing required and recommended libraries
- List of required and recommended libraries
- Create destination directories
- Destination directories for static libraries
- Destination directories for DLL libraries
- Set up PATH and environment for C compiler
- zlib
- zlib static library
- zlib DLL
- bzip2
- bzip2 static library
- bzip2 DLL
- libpng
- libpng static library
- libpng DLL
- JPEG library
- JPEG static library
- JPEG DLL
- NetPBM library
- NetPBM static library
- NetPBM DLL
- TIFF library
- TIFF static library
- TIFF DLL
- OpenSSL library
- OpenSSL static library
- OpenSSL DLL
- Net-SNMP library
- Net-SNMP static library
- Net-SNMP DLL
- Makefile modifications
- Building the software
- Installing the software
- The bindist directory in the source package

## Overview

### About this document

This documents gives hints how to install the dklibs library set and some applications using these libraries from source.
The C compiler from MS Visual C/MS Visual Studio is used.
Makefiles are used (if possible) to allow building the software on the command line and to avoid dependency on an exact MS Visual Studio version.
On my computers I have german versions of MS Windows and MS Visual Studio available only. For GUI element texts (i.e. menu commands) this text shows the german text followed by my translation attempt in brackets (for Net-SNMP). The exact texts depend on MS Windows version and language and MS Visual Studio version and language.

### Required compilers and software

- MS Visual C or MS Visual Studio. MS Visual Studio 2005 was used while writing this text, but the build process was also successful using MS Visual C++ 5.
  Note: Make sure to have the Microsoft assembler (the program is named ml.exe, sometimes the abbreviation MASM is used) installed. For MS Visual Studio this program is installed as part of the Platform SDK tools.
- Perl, I suggest the one from http://www.activestate.com.

### Downloading the source code

Source code to build the dklibs library set and some applications using the libraries can be found in the dklibs-win32 package of the dklibs SourceForge project http://sourceforge.net/projects/dklibs.
In the Download area go to the dklibs-win32 package and get the file all-*.zip (use the highest available version number).

### Runtime library versions in MSVC

When using MS Visual C there are different versions of the runtime library available:

File | Purpose | Compiler switch
--- | --- | ---
LIBC.LIB | static library, release, single-threaded | /ML
LIBCD.LIB | static library, debug, single-threaded | /MLd
LIBCMT.LIB | static library, release, multi-threaded | /MT
LIBCMTD.LIB | static library, debug, single-threaded | /MTd
MSVCRT.LIB | DLL, release | /MD
MSVCRTD.LIB | DLL, debug | /MDd

The C runtime library version is choosen at compile time using a compiler switch. Object modules contain information which runtime library version they are compiled for. The linker inspects the modules for this information and uses the runtime library version found.
If some modules were built for different runtime library versions this will result in conflicts reported by the linker.
To avoid these conflicts we will compile all modules involved in building an *.exe file - even the modules in libraries - using the same compiler switch for runtime library selection.

### Installation process overview

- Choose a runtime library type.
  You can build the software using static libraries or DLL libraries.
- Installing required and recommended software.
  First we install the required and recommended software from source. We do so to ensure the same runtime library version compiler switches for all modules.
- Makefile customization.
  The makefile (either all-stt.mak to build static libraries or all-dll.mak to build DLL versions) needs to be customized depending on the libraries available and the location of header files... on your computer.
  The main reason for bundling the source codes of the dklibs library set and the applications using these libraries is to have only one makefile to customize.
- Build the software.
- Install the software.

## Choosing a runtime library

You can build the software using static libraries or DLL libraries.
For static libraries the LIBCMT.LIB runtime library is used, for DLLs the MSVCRT.LIB runtime library is used.
I strongly recommend to build and use static libraries unless you have a good reason (you want to use the Perl XS modules) and a good knowledge of Windows system administration.

## Installing required and recommended libraries

### List of required and recommended libraries

- zlib (required)
  http://www.zlib.net
  The zlib library is used for compression, especially to read PNG images.
- bzip2 (recommended)
  http://www.bzip.org
  The bzip2 library is a compression library.
- libpng (required)
  http://www.libpng.org/pub/png/libpng.html
  This library is used by bmeps and fig2vect to read PNG images.
- JPEG library (recommended)
  ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
  This library is used by bmeps and fig2vect to read JPEG images.
- NetPBM library (recommended but difficult to build)
  http://sourceforge.net/projects/netpbm
  This library is used by bmeps to read bitmap images.
- TIFF library (recommended)
  ftp://ftp.remotesensing.org/pub/libtiff/
  This library is used by bmeps to read TIFF images.
- OpenSSL (recommended)
  http://www.openssl.org
  This library is used by kls to create MD5 and SHA-1 hashes and by createp and rndbytes to create random data.
- Net-SNMP (recommended)
  http://net-snmp.sourceforge.net
  This library can be used to manage networked devices using the SNMP protocol.

### Create destination directories

#### Destination directories for static libraries

    mkdir c:\p
    mkdir c:\p\lib-stt
    mkdir c:\p\lib-stt\include
    mkdir c:\p\lib-stt\lib
    mkdir c:\p\lib-stt\bin
    mkdir c:\p\lib-stt\share
    mkdir c:\p\lib-stt\share\snmp
    mkdir c:\p\lib-stt\share\snmp\mibs

#### Destination directories for DLL libraries

    mkdir c:\p
    mkdir c:\p\lib-dll
    mkdir c:\p\lib-dll\include
    mkdir c:\p\lib-dll\lib
    mkdir c:\p\lib-dll\bin
    mkdir c:\p\lib-dll\share
    mkdir c:\p\lib-dll\share\snmp
    mkdir c:\p\lib-dll\share\snmp\mibs

### Set up PATH and environment for C compiler

Some environment variables (i.e. PATH, INCLUDE and LIBS) must be set for the C compiler to work properly.
For Visual C 5 open a command prompt window and run

    vcvars32

to set the PATH.
For more recent versions of Visual Studio and/or Platform SDK there is a start menu entry "Visual Studio Tools => Visual Studio ... Command Prompt" in the Visual Studio program group.

### zlib

Version 1.2.3 was used while writing this text.

#### zlib static library

- Unpack the source archive.
- Change into the source directory.
- Run

      copy win32\makefile.msc makefile

  and confirm overwriting the existing makefile.
- Open the makefile in a text editor and replace

      CFLAGS  = -nologo -MD -O2 $(LOC)

  by

      CFLAGS  = -nologo -MT -O2 $(LOC)

- Run

      nmake zlib.lib

  to build the static zlib library.
- Run

      xcopy *.h c:\p\lib-stt\include\ /Y
      xcopy *.lib c:\p\lib-stt\lib\ /Y

  to install the library and the header files to c:\p\lib-stt.

#### zlib DLL

- Unpack the source archive and cd into the source directory.
- Run

      xcopy win32\*.def .
      xcopy win32\makefile.msc makefile

  and confirm to overwrite the existing makefile.
- Run

      nmake zdll.lib

  to build the software.
- Run

      xcopy *.h c:\p\lib-dll\include\ /Y
      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y

  to install the software to c:\p\lib-dll.

### bzip2

Version 1.0.5 was used while writing this text.

#### bzip2 static library

- Unpack the source archive and cd into the source directory.
- Open makefile.msc in a text editor and replace

      CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo

  by

      CFLAGS= -DWIN32 -MT -Ox -D_FILE_OFFSET_BITS=64 -nologo

- Run

      nmake -f makefile.msc lib

  to build the software.
  Warnings about an obsoleted compiler option "o" which will be removed in one of the next compiler versions can be ignored.
- Run

      xcopy *.lib c:\p\lib-stt\lib\ /Y
      xcopy *.h c:\p\lib-stt\include\ /Y

  to install the library and the header files to c:\p\lib-stt.

#### bzip2 DLL

- Unpack the source archive and change into the source directory.
- Open makefile.msc in a text editor and replace

      lib: $(OBJS)
      	lib /out:libbz2.lib $(OBJS)

  by

      lib: $(OBJS)
      	link /dll /def:libbz2.def /out:libbz2.dll /implib:libbz2.lib $(OBJS)

- Open libbz2.def in a text editor and remove the line

      DESCRIPTION		"libbzip2: library for data compression"

- Run

      nmake -f makefile.msc lib

  to build the software.
- Run

      xcopy *.h c:\p\lib-dll\include\ /Y
      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y

  to install the library to c:\p\lib-dll.

### libpng

Version 1.2.32 was used while writing this text.

#### libpng static library

- From the libpng homepage download the *.zip source archive.
- Unpack the source archive and cd into the source directory.
- Run

      copy scripts\makefile.msc makefile

  to get the makefile in place.
- Open the makefile in a texteditor and ...
  - ... replace

        MODEL=L
        CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib

    by

        CFLAGS=/nologo /MT /W3 -Ic:\p\lib-stt\include

  - ... replace

        libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
        	del libpng.lib
        	lib libpng $(OBJS1);
        	lib libpng $(OBJS2);
        	lib libpng $(OBJS3);

    by

        libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
        	del libpng.lib
        	LIB /out:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)

- Open png.h in a texteditor and replace

      #include "zlib.h"

  by

      #include <zlib.h>

- Run

      nmake libpng.lib

  to build the library
- Run

      xcopy *.lib c:\p\lib-stt\lib\ /Y
      xcopy *.h c:\p\lib-stt\include\ /Y

  to install the library and the header files to c:\p\lib-stt.

#### libpng DLL

- From the libpng homepage download the *.zip source archive.
- Unpack the source archive and cd into the source directory.
- Run

      copy scripts\makefile.msc makefile
      copy scripts\pngw32.def .

  to get the makefile in place.
- Open the makefile in a text editor and ...
  - ... replace

        MODEL=L
        CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib

    by

        CFLAGS=/nologo /MD /W3 -Ic:\p\lib-dll\include

  - ... replace

        libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
        	del libpng.lib
        	lib libpng $(OBJS1);
        	lib libpng $(OBJS2);
        	lib libpng $(OBJS3);

    by

        libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
        	del libpng.lib
        	LINK /dll /release /out:libpng.dll /def:pngw32.def /implib:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) c:\p\lib-dll\lib\zdll.lib

- Open png.h in a texteditor and replace

      #include "zlib.h"

  by

      #include <zlib.h>

- Run

      nmake libpng.lib

  to build the DLL and the import library.
- Run

      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.h c:\p\lib-dll\include\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y

  to install library, DLL and header files to c:\p\lib-dll.

### JPEG library

The JPEG library source version 6b was used while writing this text.

#### JPEG static library

- Unpack the source archive and cd into the source directory.
- Run

      copy makefile.vc makefile
      copy jconfig.vc jconfig.h

  to get makefile and configuration header file in place.
- Open makefile in a text editor and ...
  - ... remove the line

        !include <win32.mak>

  - ... replace the line

        CFLAGS= $(cflags) $(cdebug) $(cvars) -I.

    by

        CC=CL
        cc=CL
        CFLAGS= /nologo /MT /O2 -D_X86_=1 -DWIN32 -D_WIN32 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -DNDEBUG -I. -c

- Run

      nmake libjpeg.lib

  to build the library.
- Run

      xcopy *.lib c:\p\lib-stt\lib\ /Y
      xcopy *.h c:\p\lib-stt\include\ /Y

  to install the library and the header files to c:\p\lib-stt.

#### JPEG DLL

- Unpack the source archive and cd into the source directory.
- Run

      copy makefile.vc makefile
      copy jconfig.vc jconfig.h

  to get makefile and configuration header file in place.
- Open makefile in a text editor and ...
  - ... remove the line

        !include <win32.mak>

  - ... replace the line

        CFLAGS= $(cflags) $(cdebug) $(cvars) -I.

    by

        CC=CL
        cc=CL
        CFLAGS= /nologo /MD /O2 -D_X86_=1 -DWIN32 -D_WIN32 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -DNDEBUG -I. -c

  - Replace the section

        libjpeg.lib: $(LIBOBJECTS)
        	$(RM) libjpeg.lib
        	lib -out:libjpeg.lib $(LIBOBJECTS)

    by

        libjpeg.lib: $(LIBOBJECTS)
        	$(RM) libjpeg.lib
        	LINK /dll /release /out:libjpeg.dll /def:jpeg.def /implib:libjpeg.lib $(LIBOBJECTS)

- Create a file jpeg.def (copy the contents from here):

      LIBRARY		LIBJPEG
      EXPORTS
      	jpeg_std_error
      	jpeg_CreateCompress
      	jpeg_CreateDecompress
      	jpeg_stdio_src
      	jpeg_read_header
      	jpeg_start_decompress
      	jpeg_abort
      	jpeg_read_scanlines
      	jpeg_finish_decompress
      	jpeg_destroy_decompress
      	jpeg_abort
      	jpeg_set_defaults
      	jpeg_set_colorspace
      	jpeg_set_quality
      	jpeg_suppress_tables
      	jpeg_start_compress
      	jpeg_write_scanlines
      	jpeg_write_raw_data
      	jpeg_write_tables
      	jpeg_finish_compress
      	jpeg_read_raw_data
      	jpeg_destroy
      	jpeg_resync_to_restart
      	jpeg_write_marker
      	jpeg_destroy_compress
      	jpeg_simple_progression
      	jpeg_save_markers

- Run

      nmake libjpeg.lib

  to build the library.
- Run

      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.h c:\p\lib-dll\include\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y

  to install the library, the DLL and the header files to c:\p\lib-dll.

### NetPBM library

Version 10.11.10 from the super stable branch was used while writing this text.
This version is several years old. I failed to compile the recent version 10.26.57 unsing MSVC, so I have gone back to a version known to compile. [2008-10-22]

#### NetPBM static library

- After unpacking the source cd into the source directory.
- Edit the pm_config.h file, remove the line

      #include <unistd.h>

- Cd into the lib subdirectory.
- Run

      copy util\* .

  Do not overwrite existing files!
- In the files libpbm1.c and libpm.c remove the line

      #include "compile.h"

- In shhopt.c add the following contents:

      char *rindex(char *s, int c) {
      	char *back = NULL, *ptr = NULL;
      	ptr = s;
      	while(*ptr) {
      		if(*ptr == c) {
      			back = ptr;
      		}
      		ptr++;
      	}
      	return back;
      }

- In libpm.c add the following contents:

      #include <io.h>
      #include <process.h>
      #include <stdlib.h>

      static int S_ISREG(int m) {
      	int back = 0;
      	if((m & _S_IFMT) == _S_IFREG) {
      		back = 1;
      	}
      	return back;
      }

- Create makefile.msc (copy the contents from here):

      # Where do you want to install the software?
      PREFIX=c:\p\lib-stt

      # Which programs to use for compiling and linking?
      CC=CL
      LD=LINK

      # Where is Visual C?
      # Directories lib, include and bin must be beyound this.
      VC=C:\Programme\Microsoft Visual Studio 8\VC

      all:	lib

      install:	all
      	-mkdir $(PREFIX)
      	-mkdir $(PREFIX)\include
      	-mkdir $(PREFIX)\lib
      	-mkdir $(PREFIX)\bin
      	xcopy *.h   $(PREFIX)\include\
      	xcopy ..\*.h $(PREFIX)\include\
      	xcopy *.lib $(PREFIX)\lib\

      clean:
      	-del *.obj
      	-del *.lib
      	-del *.exe
      	-del *.dll

      lib:	netpbm.lib

      OBJS=	libpm.obj bitio.obj colorname.obj \
      	libpbm1.obj libpbm2.obj libpbm3.obj libpbm4.obj libpbm5.obj \
      	libpgm1.obj libpgm2.obj \
      	libppm1.obj libppm2.obj libppmcmap.obj libppm4.obj libppm5.obj \
      	libppmfloyd.obj \
      	libpnm1.obj libpnm2.obj libpnm3.obj \
      	libpam.obj libpammap.obj nstring.obj shhopt.obj

      netpbm.lib:	$(OBJS)
      	lib /nologo /out:netpbm.lib $(OBJS)

      COBJFLAGS= /nologo /MT /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /I. /I.. /I"$(VC)\Include" $(SCD) $(DEFS)

      .c.obj:
      	$(CC) $(COBJFLAGS) /c $*.c

- Edit the makefile.msc file in a text editor, you need to customize the

      VC=...

  line. The variable value must be your Visual C/Visual Studio directory. The name depends on Windows version and language and MSVC version and language.
- If you have MS Visual Studio 2005 or above, add

      -D_CRT_SECURE_NO_WARNINGS=1

  to the

      COBJFLAGS=...

  line (append at the end of the line).
- Run

      nmake -f makefile.msc

  to build the library.
- Run

      xcopy *.lib c:\p\lib-stt\lib\ /Y
      xcopy *.h c:\p\lib-stt\include\ /Y

  to install the library and the header files to c:\p\lib-stt.

#### NetPBM DLL

- After unpacking the source cd into the source directory.
- Edit the pm_config.h file, remove the line

      #include <unistd.h>

- Cd into the lib subdirectory.
- Run

      copy util\* .

  Do not overwrite existing files!
- In the files libpbm1.c and libpm.c remove the line

      #include "compile.h"

- In shhopt.c add the following contents:

      char *rindex(char *s, int c) {
      	char *back = NULL, *ptr = NULL;
      	ptr = s;
      	while(*ptr) {
      		if(*ptr == c) {
      			back = ptr;
      		}
      		ptr++;
      	}
      	return back;
      }

- In libpm.c add the following contents:

      #include <io.h>
      #include <process.h>
      #include <stdlib.h>

      static int S_ISREG(int m) {
      	int back = 0;
      	if((m & _S_IFMT) == _S_IFREG) {
      		back = 1;
      	}
      	return back;
      }

- Create makefile.msc (copy the contents from here):

      # Where do you want to install the software?
      PREFIX=c:\p\lib-dll

      # Which programs to use for compiling and linking?
      CC=CL
      LD=LINK

      # Where is Visual C?
      # Directories lib, include and bin must be beyound this.
      VC=C:\Programme\Microsoft Visual Studio 8\VC

      all:	lib

      install:	all
      	-mkdir $(PREFIX)
      	-mkdir $(PREFIX)\include
      	-mkdir $(PREFIX)\lib
      	-mkdir $(PREFIX)\bin
      	xcopy *.h   $(PREFIX)\include\
      	xcopy ..\*.h $(PREFIX)\include\
      	xcopy *.lib $(PREFIX)\lib\

      clean:
      	-del *.obj
      	-del *.lib
      	-del *.exe
      	-del *.dll

      lib:	netpbm.lib

      OBJS=	libpm.obj bitio.obj colorname.obj \
      	libpbm1.obj libpbm2.obj libpbm3.obj libpbm4.obj libpbm5.obj \
      	libpgm1.obj libpgm2.obj \
      	libppm1.obj libppm2.obj libppmcmap.obj libppm4.obj libppm5.obj \
      	libppmfloyd.obj \
      	libpnm1.obj libpnm2.obj libpnm3.obj \
      	libpam.obj libpammap.obj nstring.obj shhopt.obj

      netpbm.lib:	$(OBJS)
      	LINK /dll /release /out:netpbm.dll /def:netpbm.def /implib:netpbm.lib $(OBJS)

      COBJFLAGS= /nologo /MD /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /I. /I.. /I"$(VC)\Include" $(SCD) $(DEFS) -D_CRT_SECURE_NO_WARNINGS=1

      .c.obj:
      	$(CC) $(COBJFLAGS) /c $*.c

- Create netpbm.def (copy the contents from here):

      LIBRARY		NETPBM
      EXPORTS
      	asnprintfN
      	asprintfN
      	createBlackTuple
      	mk_argvn
      	optParseOptions
      	optParseOptions2
      	optParseOptions3
      	optSetFatalFunc
      	pam_colorname
      	pbm_check
      	pbm_defaultfont
      	pbm_dissectfont
      	pbm_dumpfont
      	pbm_getc
      	pbm_getint
      	pbm_getrawbyte
      	pbm_init
      	pbm_loadbdffont
      	pbm_loadfont
      	pbm_loadpbmfont
      	pbm_nextimage
      	pbm_readpbm
      	pbm_readpbminit
      	pbm_readpbminitrest
      	pbm_readpbmrow
      	pbm_readpbmrow_packed
      	pbm_writepbm
      	pbm_writepbminit
      	pbm_writepbmrow
      	pbm_writepbmrow_packed
      	pgm_check
      	pgm_getrawsample
      	pgm_init
      	pgm_nextimage
      	pgm_readpgm
      	pgm_readpgminit
      	pgm_readpgminitrest
      	pgm_readpgmrow
      	pgm_writepgm
      	pgm_writepgminit
      	pgm_writepgmrow
      	pgm_writerawsample
      	pm_allocarray
      	pm_allocrow
      	pm_arg0toprogname
      	pm_bitfini
      	pm_bitinit
      	pm_bitread
      	pm_bitstomaxval
      	pm_bitwrite
      	pm_canonstr
      	pm_check
      	pm_close
      	pm_closer
      	pm_closew
      	pm_colorget
      	pm_error
      	pm_freearray
      	pm_freerow
      	pm_init
      	pm_keymatch
      	pm_lcm
      	pm_maxvaltobits
      	pm_message
      	pm_nextimage
      	pm_openColornameFile
      	pm_openr
      	pm_openr_seekable
      	pm_openw
      	pm_perror
      	pm_proginit
      	pm_read_unknown_size
      	pm_readbiglong
      	pm_readbigshort
      	pm_readlittlelong
      	pm_readlittleshort
      	pm_readmagicnumber
      	pm_rgbnorm
      	pm_seek
      	pm_setMessage
      	pm_tell
      	pm_usage
      	pm_writebiglong
      	pm_writebigshort
      	pm_writelittlelong
      	pm_writelittleshort
      	pnm_YCbCrtuple
      	pnm_addtotuplehash
      	pnm_allocpamarray
      	pnm_allocpamrow
      	pnm_alloctupletable
      	pnm_assigntuple
      	pnm_backgroundxel
      	pnm_backgroundxelrow
      	pnm_blackxel
      	pnm_check
      	pnm_checkpam
      	pnm_computetuplefreqhash
      	pnm_computetuplefreqtable
      	pnm_computetupletablehash
      	pnm_createtuplehash
      	pnm_destroytuplehash
      	pnm_freepamarray
      	pnm_freetupletable
      	pnm_hashtuple
      	pnm_init
      	pnm_invertxel
      	pnm_lookuptuple
      	pnm_nextimage
      	pnm_promoteformat
      	pnm_promoteformatrow
      	pnm_readpam
      	pnm_readpaminit
      	pnm_readpamrow
      	pnm_readpnm
      	pnm_readpnminit
      	pnm_readpnmrow
      	pnm_scaletuple
      	pnm_scaletuplerow
      	pnm_setpamrow
      	pnm_tupleequal
      	pnm_tuplehashtotable
      	pnm_whitexel
      	pnm_writepam
      	pnm_writepaminit
      	pnm_writepamrow
      	pnm_writepnm
      	pnm_writepnminit
      	pnm_writepnmrow
      	ppm_addtocolorhash
      	ppm_addtocolorhist
      	ppm_addtocolorrow
      	ppm_alloccolorhash
      	ppm_check
      	ppm_colorhashtocolorhist
      	ppm_colorhisttocolorhash
      	ppm_colorname
      	ppm_colorrowtocolorhash
      	ppm_colorrowtomapfile
      	ppm_computecolorhash
      	ppm_computecolorhash2
      	ppm_computecolorhist
      	ppm_computecolorhist2
      	ppm_computecolorrow
      	ppm_findclosestcolor
      	ppm_freecolorhash
      	ppm_freecolorhist
      	ppm_fs_endrow
      	ppm_fs_free
      	ppm_fs_init
      	ppm_fs_next
      	ppm_fs_startrow
      	ppm_fs_update
      	ppm_fs_update3
      	ppm_init
      	ppm_lookupcolor
      	ppm_mapfiletocolorrow
      	ppm_nextimage
      	ppm_parsecolor
      	ppm_readppm
      	ppm_readppminit
      	ppm_readppminitrest
      	ppm_readppmrow
      	ppm_sortcolorrow
      	ppm_writeppm
      	ppm_writeppminit
      	ppm_writeppmrow
      	ppmd_circle
      	ppmd_fill
      	ppmd_fill_drawproc
      	ppmd_fill_init
      	ppmd_filledrectangle
      	ppmd_line
      	ppmd_point_drawproc
      	ppmd_polyspline
      	ppmd_setlineclip
      	ppmd_setlinetype
      	ppmd_spline3
      	ppmd_text
      	ppmd_text_box
      	snprintfN
      	strfree
      	stripeq
      	vasnprintfN
      	vasprintfN
      	vsnprintfN
      	xeltopixel

- Edit the makefile.msc file in a text editor, you need to customize the

      VC=...

  line. The variable value must be your Visual C/Visual Studio directory. The name depends on Windows version and language and MSVC version and language.
- If you have MS Visual Studio 2005 or above, add

      -D_CRT_SECURE_NO_WARNINGS=1

  to the

      COBJFLAGS=...

  line (append at the end of the line).
- Run

      nmake -f makefile.msc

  to build the library.
- Run

      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y
      xcopy *.h c:\p\lib-dll\include\ /Y

  to install the library and the header files to c:\p\lib-dll.

### TIFF library

Version 3.8.2 was used while writing this text.

#### TIFF static library

- After downloading and unpacking the *.zip archive cd into the source directory.
- Open nmake.opt in a text editor and ...
  - ... replace

        #JPEG_SUPPORT	= 1
        #JPEGDIR 	= d:/projects/jpeg-6b
        #JPEG_INCLUDE	= -I$(JPEGDIR)
        #JPEG_LIB 	= $(JPEGDIR)/Release/jpeg.lib

    by

        JPEG_SUPPORT	= 1
        JPEGDIR 	= c:/p/lib-stt
        JPEG_INCLUDE	= -I$(JPEGDIR)/include
        JPEG_LIB 	= $(JPEGDIR)/lib/libjpeg.lib

  - ... replace

        #ZIP_SUPPORT	= 1
        #ZLIBDIR 	= d:/projects/zlib-1.2.1
        #ZLIB_INCLUDE	= -I$(ZLIBDIR)
        #ZLIB_LIB 	= $(ZLIBDIR)/zlib.lib

    by

        ZIP_SUPPORT	= 1
        ZLIBDIR 	= c:/p/lib-stt
        ZLIB_INCLUDE	= -I$(ZLIBDIR)/include
        ZLIB_LIB 	= $(ZLIBDIR)/lib/zlib.lib

  - ... replace

        #PIXARLOG_SUPPORT = 1

    by

        PIXARLOG_SUPPORT = 1

  - ... replace

        OPTFLAGS =	/Ox /MD /GX /W3

    by

        OPTFLAGS =	/Ox /MT /W3 -D_CRT_SECURE_NO_WARNINGS=1

- Cd into the libtiff directory.
- Run

      nmake -f makefile.vc libtiff.lib

  to build the library.
- Run

      xcopy *.h c:\p\lib-stt\include\ /Y
      xcopy *.lib c:\p\lib-stt\lib\ /Y

  to install the library and the header files into c:\p\lib-stt.

#### TIFF DLL

- After downloading and unpacking the *.zip archive cd into the source directory.
- Open nmake.opt in a text editor and ...
  - ... replace

        #JPEG_SUPPORT	= 1
        #JPEGDIR 	= d:/projects/jpeg-6b
        #JPEG_INCLUDE	= -I$(JPEGDIR)
        #JPEG_LIB 	= $(JPEGDIR)/Release/jpeg.lib

    by

        JPEG_SUPPORT	= 1
        JPEGDIR 	= c:/p/lib-dll
        JPEG_INCLUDE	= -I$(JPEGDIR)/include
        JPEG_LIB 	= $(JPEGDIR)/lib/libjpeg.lib

  - ... replace

        #ZIP_SUPPORT	= 1
        #ZLIBDIR 	= d:/projects/zlib-1.2.1
        #ZLIB_INCLUDE	= -I$(ZLIBDIR)
        #ZLIB_LIB 	= $(ZLIBDIR)/zlib.lib

    by

        ZIP_SUPPORT	= 1
        ZLIBDIR 	= c:/p/lib-dll
        ZLIB_INCLUDE	= -I$(ZLIBDIR)/include
        ZLIB_LIB 	= $(ZLIBDIR)/lib/zdll.lib

  - ... replace

        #PIXARLOG_SUPPORT = 1

    by

        PIXARLOG_SUPPORT = 1

  - ... replace

        OPTFLAGS =	/Ox /MD /GX /W3

    by

        OPTFLAGS =	/Ox /MD /W3 -D_CRT_SECURE_NO_WARNINGS=1

  - ... replace

        $(DLLNAME):	tif_config.h tiffconf.h libtiff.def $(OBJ)
        	$(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \
        	/implib:libtiff_i.lib $(OBJ) $(LIBS)

    by

        $(DLLNAME):	tif_config.h tiffconf.h libtiff.def $(OBJ)
        	$(LD) /release /dll /def:libtiff.def /out:$(DLLNAME) \
        	/implib:libtiff_i.lib $(OBJ) $(LIBS)

- Cd into the libtiff directory.
- Run

      nmake -f makefile.vc libtiff.dll

  to build the library.
- Run

      xcopy *.h c:\p\lib-dll\include\ /Y
      xcopy *.lib c:\p\lib-dll\lib\ /Y
      xcopy *.dll c:\p\lib-dll\bin\ /Y

  to install the library and the header files into c:\p\lib-dll.

### OpenSSL library

Version 0.9.8i was used while writing this text.

#### OpenSSL static library

- After unpacking the source archive cd into the source directory.
- Run

      perl Configure VC-WIN32 --prefix=c:/p/lib-stt
      ms\do_masm
      nmake -f ms\nt.mak
      nmake -f ms\nt.mak install

  to configure, build and install the software.

#### OpenSSL DLL

- After unpacking the source archive cd into the source directory.
- Run

      perl Configure VC-WIN32 --prefix=c:/p/lib-dll
      ms\do_masm
      nmake -f ms\ntdll.mak
      nmake -f ms\ntdll.mak install

  to configure, build and install the software.

### Net-SNMP library

Visual Studio 2005 was used while writing this text.

#### Net-SNMP static library

- Unpack the software.
- Change into the win32 subdirectory in the source directory and run

      perl Configure --config=release --linktype=static --prefix="c:/p/lib-stt" --with-ssl

  If you do not have OpenSSL installed in c:\p\lib-stt do not use "--with-ssl".
- Start Visual Studio, open the win32\win32.dsw project file.
- Choose release configuration instead of debug configuration:
  - In the menu choose "Erstellen => Konfigurations-Manager..." ("Build => Configuration manager...")
  - Change the "Konfiguration der aktuellen Projektmappe:" ("Project folder configuration") from Debug to Release
  - Click "Schließen" ("Close") to confirm.
- Add c:\p\lib-stt\include to the include path:
  - In the menu choose "Extras => Optionen..." ("Extras => Options...")
  - In the "Optionen" ("Options") dialog box choose "Projekte und Projektmappen => VC++-Verzeichnisse" in the tree view ("Projects and project folders =>VC++ directories").
  - Choose the "Win32" platform, show directories for "Includedateien" ("include files").
  - Add "c:\p\lib-stt\include" to the end of the list.
  - Click "OK" to confirm.
- In the "Projektmappen-Explorer" panel ("project folders explorer") there are the projects
  - libagent
  - libhelpers
  - libnetsnmptrapd
  - libsnmp
  - netsnmpmibs
  For each of these projects:
  - Click on the project to mark it.
  - In the context menu (right mouse key) choose "Eigenschaften" ("Properties").
  - In the tree view on the left navigate to "Konfigurationseigenschaften => C/C++ => Präprozessor" ("Configuration => C/C++ => Preprocessor").
  - In the "Präprozessordefinitionen" ("Preprocessor definitions") text field add "_CRT_SECURE_NO_WARNINGS=1". If there is already text in the text field use the semicolon as separator between existing text and new text.
  - In the tree view go to "Codegenerierung" ("Code generation").
  - Change "Laufzeitbibliothek" ("run time library") to "Multithreaded (/MT)".
  - Click "OK" to confirm.
- In the menu choose "Erstellen => Batch erstellen..." ("Build => Batch build...").
- In the "Batch erstellen" ("Batch build") dialog box activate
  - libagent Release Win32
  - libhelpers Release Win32
  - libnetsnmptrapd Release Win32
  - libsnmp Release Win32
  - netsnmpmibs Release Win32
- Click "Neu erstellen" ("Build new").
- As a result of the build process there should be 4 projects built successfully. May be there are warnings in the output window but there should not be errors.
- Remove c:\p\lib-stt\include from the include path.
- Exit Visual Studio.
- Change into the source directory and run

      xcopy win32\lib\release\*.lib c:\p\lib-stt\lib\ /Y
      xcopy include\net-snmp\*.h c:\p\lib-stt\include\net-snmp\ /Y /E /S
      xcopy include\ucd-snmp\*.h c:\p\lib-stt\include\ucd-snmp\ /Y /E /S
      xcopy win32\net-snmp\*.h c:\p\lib-stt\include\net-snmp\ /Y /E /S
      xcopy mibs\* \c:\p\lib-stt\share\snmp\mibs\ /S /Y /E

- Open c:\p\lib-stt\include\net-snmp\net-snmp-config.h in a text editor and remove the line

      typedef unsigned short mode_t;

#### Net-SNMP DLL

- Unpack the software.
- Change into the win32 subdirectory in the source directory and run

      perl Configure --config=release --linktype=dynamic --prefix="c:/p/lib-dll" --with-ssl

  If you do not have OpenSSL installed in c:\p\lib-dll do not use "--with-ssl".
- Open win32\libsnmp_dll\libsnmp.def in a text editor.
  After

      	snmp_enable_filelog

  add

      	snmp_disable_filelog
      	netsnmp_enable_filelog

- Start Visual Studio, open the win32\libsdll.dsw project file.
- Choose release configuration instead of debug configuration:
  - In the menu choose "Erstellen => Konfigurations-Manager..." ("Build => Configuration manager...")
  - Change the "Konfiguration der aktuellen Projektmappe:" ("Project folder configuration") from Debug to Release
  - Click "Schließen" ("Close") to confirm.
- Add c:\p\lib-dll\include to the include path and c:\p\lib-dll\lib to the library path:
  - In the menu choose "Extras => Optionen..." ("Extras => Options...")
  - In the "Optionen" ("Options") dialog box choose "Projekte und Projektmappen => VC++-Verzeichnisse" in the tree view ("Projects and project folders =>VC++ directories").
  - Choose the "Win32" platform, show directories for "Includedateien" ("include files").
  - Add "c:\p\lib-dll\include" to the end of the list.
  - Show directories for "Bibliotheksdateien" ("Library files") and add the directory "c:\p\lib-dll\lib" to the end of the list.
  - Show directories for "Ausführbare Dateien" ("Executable files") and add "c:\p\lib-dll\bin" to the end of the list.
  - Click "OK" to confirm.
- In the "Projektmappen-Explorer" panel ("project folders explorer") there are the projects
  - libagent
  - libhelpers
  - libnetsnmptrapd
  - libsnmp_dll
  - netsnmpmibs
  For each of these projects:
  - Click on the project to mark it.
  - In the context menu (right mouse key) choose "Eigenschaften" ("Properties").
  - In the tree view on the left navigate to "Konfigurationseigenschaften => C/C++ => Präprozessor" ("Configuration => C/C++ => Preprocessor").
  - In the "Präprozessordefinitionen" ("Preprocessor definitions") text field add "_CRT_SECURE_NO_WARNINGS=1". If there is already text in the text field use the semicolon as separator between existing text and new text.
  - Click "OK" to confirm.
- Click on the libsnmp_dll project.
- From the context menu (right mouse key) choose "Eigenschaften" ("Properties").
- In the tree view navigate to "Konfigurationseigenschaften => Linker => Befehlszeile" ("Configuration properties => Linker => Command line").
- In "Zusätzliche Optionen" ("Additional options") add "C:\p\lib-dll\lib\ssleay32.lib C:\p\lib-dll\lib\libeay32.lib" and click "OK" to confirm.
- In the menu choose "Erstellen => Batch erstellen..." ("Build => Batch build...").
- In the "Batch erstellen" ("Batch build") dialog box activate
  - libagent Release Win32
  - libhelpers Release Win32
  - libnetsnmptrapd Release Win32
  - libsnmp Release Win32
  - netsnmpmibs Release Win32
- Click "Neu erstellen" ("Build new").
- As a result of the build process there should be 4 projects built successfully. May be there are warnings in the output window but there should not be errors.
- Remove c:\p\lib-dll\include from the include path.
- Exit Visual Studio.
- Change into the source directory and run

      xcopy win32\lib\release\*.lib c:\p\lib-dll\lib\ /Y
      xcopy include\net-snmp\*.h c:\p\lib-dll\include\net-snmp\ /Y /E /S
      xcopy include\ucd-snmp\*.h c:\p\lib-dll\include\ucd-snmp\ /Y /E /S
      xcopy win32\net-snmp\*.h c:\p\lib-dll\include\net-snmp\ /Y /E /S
      xcopy win32\bin\release\*.dll c:\p\lib-dll\bin\ /Y /E /S
      xcopy mibs\* c:\p\lib-dll\share\snmp\mibs\ /S /Y /E

- Open c:\p\lib-dll\include\net-snmp\net-snmp-config.h in a text editor and remove the line

      typedef unsigned short mode_t;

## Makefile modifications

After unpacking all-*.zip change into the all subdirectory of the source package.
Edit either all-stt.mak if you want to build and use static libraries or all-dll.mak if you want to build and use DLLs.

- `PROGRAMS=...`
  Change this to the base directory where programs reside (may be "C:\Programs" or "C:\Program Files" in english versions.
- `PREFIX=...`
  You can leave this setting as is but I prefer short directory names for directories mentioned in the PATH environment variable, i.e. "C:\P\Kr".
- `LIBSRC=...`
  If the required/recommended libraries do not reside in the default directory c:\p\lib-stt (or c:\p\lib-dll for all-dll.mak) enter the correct directore here.
- `COPTIONS=...`
  For MS Visual C 5 there were additional options available "/XY /QI0f /QIfdiv".
- `VC=...`
  Choose your MS Visual C / Visual Studio program directory.
- `PLATFORMSDK=...`
  If you have another a Platform SDK installed additionally to the one shipped with MS Visual C / Visual Studio enter the path to this PSDK.
- If the bzip2 library is not installed on your system replace

      # ### IF YOU DO NOT HAVE BZ2LIB, TOGGLE THIS SECTION
      # --------------------------------------------------
      # BZL_DEF=-DHAVE_BZLIB_H=0
      # BZL_DIR=
      # BZL_LIB=
      BZL_DEF=-DHAVE_BZLIB_H=1
      BZL_DIR=-I$(LIBSRC)\Include
      BZL_LIB=libbz2.lib

  by

      # ### IF YOU DO NOT HAVE BZ2LIB, TOGGLE THIS SECTION
      # --------------------------------------------------
      BZL_DEF=-DHAVE_BZLIB_H=0
      BZL_DIR=
      BZL_LIB=
      # BZL_DEF=-DHAVE_BZLIB_H=1
      # BZL_DIR=-I$(LIBSRC)\Include
      # BZL_LIB=libbz2.lib

- If the zlib library is not installed on your system replace

      # ### IF YOU DO NOT HAVE ZLIB, TOGGLE THIS SECTION
      # ------------------------------------------------
      # ZL_DEF=-DHAVE_ZLIB_H=0
      # ZL_DIR=
      # ZL_LIB=
      ZL_DEF=-DHAVE_ZLIB_H=1
      ZL_DIR=-I$(LIBSRC)\Include
      ZL_LIB=zlib.lib

  by

      # ### IF YOU DO NOT HAVE ZLIB, TOGGLE THIS SECTION
      # ------------------------------------------------
      ZL_DEF=-DHAVE_ZLIB_H=0
      ZL_DIR=
      ZL_LIB=
      # ZL_DEF=-DHAVE_ZLIB_H=1
      # ZL_DIR=-I$(LIBSRC)\Include
      # ZL_LIB=zlib.lib

- If the libpng library is not installed on your system replace

      # PNGLIB requires ZLIB!
      # ---------------------
      # PNG_DEF=-DHAVE_LIBPNG=0 -DHAVE_PNG_H=0
      PNG_DEF=-DHAVE_LIBPNG=1 -DHAVE_PNG_H=1
      PNG_DIR=-I$(LIBSRC)\Include
      PNG_LIB=libpng.lib
      PNGEPSOBJ=pngeps.obj
      BMEPSEXE=bmeps.exe

  by

      # PNGLIB requires ZLIB!
      # ---------------------
      PNG_DEF=-DHAVE_LIBPNG=0 -DHAVE_PNG_H=0
      # PNG_DEF=-DHAVE_LIBPNG=1 -DHAVE_PNG_H=1
      # PNG_DIR=-I$(LIBSRC)\Include
      # PNG_LIB=libpng.lib
      # PNGEPSOBJ=pngeps.obj
      # BMEPSEXE=bmeps.exe

- If the JPEG library is not installed on your system replace

      # JPEGLIB
      # -------
      # JPG_DEF=-DHAVE_JPEGLIB_H=0
      JPG_DEF=-DHAVE_JPEGLIB_H=1
      JPG_DIR=-I$(LIBSRC)\Include
      JPG_LIB=libjpeg.lib
      JPGEPSOBJ=jpgeps.obj

  by

      # JPEGLIB
      # -------
      JPG_DEF=-DHAVE_JPEGLIB_H=0
      # JPG_DEF=-DHAVE_JPEGLIB_H=1
      # JPG_DIR=-I$(LIBSRC)\Include
      # JPG_LIB=libjpeg.lib
      # JPGEPSOBJ=jpgeps.obj

- If the TIFF library is not installed on your system replace

      # TIFFLIB - maybe after June 2003
      # TIF_DEF=-DHAVE_TIFF_H=0
      TIF_DEF=-DHAVE_TIFF_H=1
      TIF_DIR=-I$(LIBSRC)\Include
      TIF_LIB=libtiff.lib
      TIFEPSOBJ=tifeps.obj

  by

      # TIFFLIB - maybe after June 2003
      TIF_DEF=-DHAVE_TIFF_H=0
      # TIF_DEF=-DHAVE_TIFF_H=1
      # TIF_DIR=-I$(LIBSRC)\Include
      # TIF_LIB=libtiff.lib
      # TIFEPSOBJ=tifeps.obj

- If the NetPBM library is not installed on your system replace

      # NETPBM
      # ------
      # PNM_DEF=-DHAVE_PNM_H=0
      # PNM_DLL=netpbm.dll
      PNM_DEF=-DHAVE_PNM_H=1
      PNM_DIR=-I$(LIBSRC)\Include
      PNM_LIB=$(LIBSRC)\Lib\netpbm.lib
      PNM_DLL=$(LIBSRC)\Bin\netpbm.dll
      PNMEPSOBJ=pnmeps.obj

  by

      # NETPBM
      # ------
      PNM_DEF=-DHAVE_PNM_H=0
      PNM_DLL=netpbm.dll
      # PNM_DEF=-DHAVE_PNM_H=1
      # PNM_DIR=-I$(LIBSRC)\Include
      # PNM_LIB=$(LIBSRC)\Lib\netpbm.lib
      # PNM_DLL=$(LIBSRC)\Bin\netpbm.dll
      # PNMEPSOBJ=pnmeps.obj

- If the OpenSSL library is not installed on your system replace

      # OpenSSL
      # -------
      # CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=0 -DHAVE_OPENSSL_SHA_H=0
      # CRYPTO_DLL=
      # CRYPTO_LIB=
      # CRYPTO_DIR=
      # CRYPTO_CP1=echo No need for $(LIBSRC)\Bin\LIBEAY32.DLL
      # CRYPTO_CP2=echo No need for $(LIBSRC)\Bin\SSLEAY32.DLL
      CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=1 -DHAVE_OPENSSL_SHA_H=1 -DHAVE_OPENSSL_RAND_H=1
      CRYPTO_DLL=$(LIBSRC)\Bin\LIBEAY32.DLL $(LIBSRC)\Bin\SSLEAY32.DLL
      CRYPTO_LIB=$(LIBSRC)\LIB\LIBEAY32.LIB $(LIBSRC)\LIB\SSLEAY32.LIB
      CRYPTO_DIR=-I$(LIBSRC)\Include
      CRYPTO_CP1=xcopy $(LIBSRC)\Bin\LIBEAY32.DLL $(PREFIX)\bin
      CRYPTO_CP2=xcopy $(LIBSRC)\Bin\SSLEAY32.DLL $(PREFIX)\bin

  by

      # OpenSSL
      # -------
      CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=0 -DHAVE_OPENSSL_SHA_H=0
      CRYPTO_DLL=
      CRYPTO_LIB=
      CRYPTO_DIR=
      CRYPTO_CP1=echo No need for $(LIBSRC)\Bin\LIBEAY32.DLL
      CRYPTO_CP2=echo No need for $(LIBSRC)\Bin\SSLEAY32.DLL
      # CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=1 -DHAVE_OPENSSL_SHA_H=1 -DHAVE_OPENSSL_RAND_H=1
      # CRYPTO_DLL=$(LIBSRC)\Bin\LIBEAY32.DLL $(LIBSRC)\Bin\SSLEAY32.DLL
      # CRYPTO_LIB=$(LIBSRC)\LIB\LIBEAY32.LIB $(LIBSRC)\LIB\SSLEAY32.LIB
      # CRYPTO_DIR=-I$(LIBSRC)\Include
      # CRYPTO_CP1=xcopy $(LIBSRC)\Bin\LIBEAY32.DLL $(PREFIX)\bin
      # CRYPTO_CP2=xcopy $(LIBSRC)\Bin\SSLEAY32.DLL $(PREFIX)\bin

- If the Net-SNMP library is not installed on your system replace

      # NET-SNMP
      # --------
      # SNMP_DEF=-DHAVE_LIBNETSNMP=0 -DHAVE_LIBUCDSNMP=0
      # SNMP_DLL=netsnmp.dll
      # SNMP_DIR=
      # SNMP_LIB=
      # SNMPYALC=
      SNMPYALC=snmpyalc.exe klpinfo.exe
      SNMP_DEF=-DHAVE_LIBNETSNMP=1 -DHAVE_LIBUCDSNMP=0 -DNDEBUG -D_WINDOWS -DHAVE_MODE_T=1
      SNMP_DIR=-I$(LIBSRC)\Include
      SNMP_LIB=$(LIBSRC)\Lib\netsnmp.lib $(CRYPTO_LIB)
      SNMP_DLL=$(LIBSRC)\Bin\netsnmp.dll
      SNMP_LOG=-DHAVE_HORRIBLE_NETSNMP_LOGGING=1

  by

      # NET-SNMP
      # --------
      SNMP_DEF=-DHAVE_LIBNETSNMP=0 -DHAVE_LIBUCDSNMP=0
      SNMP_DLL=netsnmp.dll
      SNMP_DIR=
      SNMP_LIB=
      SNMPYALC=
      # SNMPYALC=snmpyalc.exe klpinfo.exe
      # SNMP_DEF=-DHAVE_LIBNETSNMP=1 -DHAVE_LIBUCDSNMP=0 -DNDEBUG -D_WINDOWS -DHAVE_MODE_T=1
      # SNMP_DIR=-I$(LIBSRC)\Include
      # SNMP_LIB=$(LIBSRC)\Lib\netsnmp.lib $(CRYPTO_LIB)
      # SNMP_DLL=$(LIBSRC)\Bin\netsnmp.dll
      # SNMP_LOG=-DHAVE_HORRIBLE_NETSNMP_LOGGING=1

## Building the software

Run

    nmake -f all-stt.mak

## Installing the software

Run

    nmake -f all-stt.mak install

to install the software to c:\programme\krause (or whatever you specified as PREFIX in the makefile).
Run

    c:\programme\krause\bin\dkwftreg.exe c:\programme\krause

to add c:\programme\krause\bin to the PATH environment variable and register context menu entries for Windows explorer.

## The bindist directory in the source package

The contents of my c:\krause\bindist directory is included in the sources for completeness. You can use the files here to produce your own executable setup files, but this is optional.
The directory contains:

- The create.bat file I use to create directories for the binary distributions.
- The base.iss and user.iss files for InnoSetup to create the executable setups.

If you want to build customized executable setup files I recommend to to use these examples as a starting point. Feel free to customize these files as needed.

Before you use this directories contents create the following directories on your computer:

- c:\shares\forunix\kr\krause.stt
  Copy the contents of an installation using static libraries to there (you must have "bin", "include" and "lib"... subdirectories in the directory.
- c:\shares\forunix\kr\krause.dll
  Copy the contents of an installation using DLLs to there (you must have "bin", "include" and "lib"... subdirectories in the directory.
- c:\krause\bindist
  Copy the contents of the bindist subdirectory in the source package to that directory.
- c:\shares\forunix
  Zip the src subdirectory of the sourcepackage

      move src all
      zip -q -r -9 all-1.2.14 all

  Move all-1.2.14.zip to c:\shares\forunix (for later versions the version number will vary).