file : README.msvc - 2010-08-12

source: http://shapelib.maptools.org/

Some notes on 'shapelib' building... There is a
makefile.vc which will build a shapelib DLL, and
the executable utilities using that DLL, but
here is a 'static' shapelib build, and then linked
with each executable utility...

MSVC6 build files are supplied, that is DSW and DSP
files, to be fully compatible with _ALL_ later 
versions of Microsoft Visual Studio, 7, 8, 9, 10, ...
and hopefully even later ;=))

There are TWO(2) main project sets :-

1. shapefile.dsw
This includes not only the static 'shapelib', and
the utilities that come with that source, but also
multiple other 'utilities' in the 'contrib' folder -
some 15 projects in total.

2. shpsimple.dsw
This is only the main 'static' shapelib, and the
utilities that come with that source, excluding
those in the 'contrib' folder, hence 'simple'.

Note, shpgeo.dsp (lib), shpdata.dsp (exe), shpcentrd.dsp (exe),
shpproj.dsp (exe) and shpwkb.dsp (exe) are supplied, BUT NOT
included in the above DSW, since they are dependant on
the PROJ.4 <proj_api.h> header, (and proj[d].lib library).

If you _DO_ have proj.4 installed and built, see
 http://trac.osgeo.org/proj/
then there is a 'shpproj.dsw', containing these 5 DSP
projects, 1 static library, and 4 executables, 
but you may need to adjust the 'include'
directory from 'C:\Projects\proj.4\proj-4.7.0\src'
to where you have the 'proj_api.h' available, and
likewise adjust the name of the 'proj[d].lib' and
its dependancy directory, presently set to -
'C:\Projects\proj.4\proj-4.7.0\contrib\msvc\lib'.

The OUTPUT of the 'static' libraries are put in the
created 'lib' folder, and named -
'shapelib.lib' for the Release build, and 
'shapelibd.lib' for the Debug build.

All the executable EXE utilities are placed in the
created 'bin' folder, again in a form like -
'shpcreate.exe' for Release, and 
'shpcreated.exe' for the Debug version,
and are of course dependant on the above 'static' 
lib\shapelib[d].lib...

The RUNTIME library chosen for this build is -
Release: Multithreaded DLL (/MD), and
Debug: Multithread Debug DLL (/MDd), thus can
NOT be mixed with /MT-/MTd projects. Adjust all the
DSP files, if this alternate RUNTIME is desired.

In addition, various batch files are provided -

clobnow.bat  - cleans various MSVC created files.

delsln.bat   - deletes the MSVC 'solution' files.

cleanall.bat - Runs 'clobnow', and then deletes the Release,
 and Debug folders, and if run with an 'A' command, will
 also run 'delsln', and remove the 'bin', and 'lib'
 folders. That is reduce the folder back to just the
 DSW/DSP files, batch, and this text.
 
zipall.bat    - Requires another batch file, zip8.bat,
 to do the actual zipping. It first does -
 (a) a clean ALL, and then 
 (b) the zipping. using a call to zip8 batch... it
will zip the 'msvc' folder, and then the complete source.

zipbin.bat    - Requires 'zip8.bat', and will generate
a binary distribution zip.

But these are mainly for developer usage...

shptest.bat   - Requires that shpproj.exe has been built,
which as noted has a dependence on proj_api.h! See more 
information on this in README.shpgeo.txt.

Source Changes:
A few source changes were made, but only to REDUCE the
number of compiler WARNINGS issued. There should be
NO errors, even with the 'raw' source.

And as noted in README.shpgeo.txt, if you download,
and compile the PROJ.4 library, and then the additional
utilities in 'shpproj.dsw', you must take care of the
PROJ.4 location.

With this set of MSVC build files, it should be easy
to compile the shapelib, and the 'shp' and 'dbf'
utilities from source, using MSVC (any version).

Geoff.
email: report_at_geoffair_dot_info
 
# eof
