Compile GEOS
- Download GEOS-3.3.4 Source Code address: http://download.osgeo.org/geos/geos-3.3.4.tar.bz2
- Enter the Visual studio command line Environment
- Go to the decompressed directory of GEOS.
- Type the following command:
autogen.bat
Nmake/f makefile. vc MSVC_VER = 1500 // I use VS2008, so set it to 1500
- Copy the capi and include directories to the directory referenced by the project, and delete other files (for example,. in,. obj,. cpp,. txt, etc.) in the non-. h header file)
Compile GDAL-191
- Download GDAL-191 Source Code address: http://download.osgeo.org/gdal/gdal191.zip
- Enter the Visual studio command line Environment
- Enter the directory after GDAL Decompression
- Modify nmake. opt to enable the GEOS compilation switch.
# Uncomment for GEOS support
GEOS_DIR = E: \ OpenSource \ geos-3.3.4
GEOS_CFLAGS =-I $ (GEOS_DIR)/capi-I $ (GEOS_DIR)/include-DHAVE_GEOS
GEOS_LIB = $ (GEOS_DIR)/src/geos_c_ I .lib
- Modify nmake. opt to enable MYSQL compilation.
# MySQL Libraries
# NOTE: Need/MT instead of/MD, also enable/ehsswitch.
MYSQL_INC_DIR = "D: \ DB \ MySQL Server 5.5 \ include"
MYSQL_LIB = "D: \ DB \ MySQL Server 5.5 \ lib \ libmysql. lib"
- Type the following command:
Nmake/f makefile. vc
Nmake/f makefile. vc install
Nmake/f makefile. vc devinstall
Nmake/f makefile. vc clean
- Copy the relevant files under the C: \ warmdam directory to the project reference directory, and delete the files that are not. h. Other files in the header file (for example :. in ,. obj ,. cpp ,. txt)
Then, you can reference GDAL and GEOS in your project to access Mysql Data and use GEOS to process spatial data.