GDAL-191 and GEOS-3.3.4 mixing (MYSQL supported)

Source: Internet
Author: User

Compile GEOS

  1. Download GEOS-3.3.4 Source Code address: http://download.osgeo.org/geos/geos-3.3.4.tar.bz2
  2. Enter the Visual studio command line Environment
  3. Go to the decompressed directory of GEOS.
  4. Type the following command:
    autogen.bat
    Nmake/f makefile. vc MSVC_VER = 1500 // I use VS2008, so set it to 1500
  5. 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

  1. Download GDAL-191 Source Code address: http://download.osgeo.org/gdal/gdal191.zip
  2. Enter the Visual studio command line Environment
  3. Enter the directory after GDAL Decompression
  4. 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
  5. 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"
  6. Type the following command:

    Nmake/f makefile. vc

    Nmake/f makefile. vc install

    Nmake/f makefile. vc devinstall

    Nmake/f makefile. vc clean

  7. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.