Unlike Linux where libraries and their dependencies are usually in consistent places, there is no standard for organizing directories in Windows. In order to build and link with liblept this procedure has to assume one such organization. All required files should reside within a single directory. This guide calls that directory BuildFolder but you can call it whatever you want, only the relative placement and names of the subdirectories matter. In addition, this discussion uses the latest actual directories from the required libraries at the time this guide was written. You can of course use different versions and name these directories as you please.
To give an idea of what will be required to build and link with liblept using Visual Studio 2008, here’s what the complete top-level contents of BuildFolder will need to look like. All the subdirectories are required if you decide to build the image file libraries yourself. If you instead opt to use pre-built libraries the italicized directories can be omitted:
BuildFolder giflib-4.1.6\ include\ jpeg-8c\ leptonica-1.68\ lib\ lpng143\ tiff-3.9.4\ zlib\
leptonica\
gif_lib.h
jconfig.h
jerror.h
jmorecfg.h
jpeglib.h
png.h
pngconf.h
tiff.h
tiffconf.h
tiffio.h
tiffvers.h
tif_config.h
zconf.h
zlib.h
allheaders.h
alltypes.h
array.h
arrayaccess.h
bbuffer.h
bmf.h
bmp.h
ccbord.h
dewarp.h
environ.h
freetype.h
gplot.h
heap.h
imageio.h
jbclass.h
leptprotos.h
leptwin.h
list.h
morph.h
pix.h
ptra.h
queue.h
readbarcode.h
regutils.h
stack.h
sudoku.h
watershed.h
giflib416-static-mtdll.lib giflib416-static-mtdll-debug.lib liblept168-static-mtdll-debug.lib liblept168-static-mtdll.lib liblept168.dll liblept168.lib liblept168d.dll liblept168d.lib libjpeg8c-static-mtdll-debug.lib libjpeg8c-static-mtdll.lib libpng143-static-mtdll-debug.lib libpng143-static-mtdll.lib libtiff394-static-mtdll-debug.lib libtiff394-static-mtdll.lib zlib125-static-mtdll-debug.lib zlib125-static-mtdll.lib