Osgearth compiling--taking VS2012 as an example

Source: Internet
Author: User

Organize and record the Osgearth compilation process.

Osgearth is a three-dimensional geographic platform that relies on OSG.

preparatory work

Openscenegraph-3.4.0.zip

Osg_3rdparty_dir http://download.osgvisual.org/3rdParty_VS2012.3_v110_x86_x64_V8b_full.7z

GEOS-3.4.2.TAR.BZ2 http://download.osgeo.org/geos/geos-3.4.2.tar.bz2

SQLite https://www.sqlite.org/download.html

osgearth-2.7 https://github.com/gwaldron/osgearth/releases

Compiling work

Compile OSG, then compile or download geos and SQLite, and finally compile Osgearth;

Compiling OSG

1, decompression openscenegraph-3.4.0.zip and 3rdparty_vs2012.3_v110_x86_x64_v8b_full.7z

2. Install Open cmake,https://cmake.org/download/

Configure the source code path to e:/osg3.4.0/openscenegraph-3.4.0/openscenegraph-3.4.0

Configuring the Build path to e:/osg3.4.0/openscenegraph-3.4.0/openscenegraph-3.4.0/vs2012

3. Click Configre to select the VS version.

4, configure Actual_3rdparty_dir path to 3rdparty_vs2012.3_v110_x86_x64_v8b_full.7z decompression path, and pay attention to choose X64 or X86 folder

5, click Configure, complete, click Generate. VS2012 Open, and compile complete. Use the contents of the Bin,include,lib folder.

Compiling GEOS

1, install CMake2.8 above version, unzip GeoS to E:\geos-3.4.2, create new E:\geos-3.4.2\vs2012 as the target folder for compilation

2, cmd command line configuration as follows e:\geos-3.4.2\vs2012> cmake-g "Visual Studio one Win64" E:\geos-3.4.2 if it is x86 version, remove Win64.

3, vs Open project. To differentiate between the DLL and Lib under Release and debug, change the GEOS output directory.

Import library, high-level linker

Output file, general--linker

      

4, create a new folder, copy the source file and the compilation file include to include, copy the Geos.dll,geosd.dll to the Bin folder, copy the Geos.lib,geosd.lib to the Lib folder

Compiling SQLite

1. Download sqlite-amalgamation-3130000.zip and sqlite-dll-win64-x64-3130000.zip in https://www.sqlite.org/ Download.html, and Unzip

2, new vs Win32 project, DLL empty project. Once determined, the configuration solution changes from Win32 to X64.

3, copy sqlite3.h and sqlite3ext.h from sqlite-amalgamation-3130000, add to project header file,

Copy the Sqlite3.def in sqlite3.c and sqlite-dll-win64-x64-3130000 to the project source file.

4. Enter SQLITE3.DEF in the module definition file, linker-

Adding sqlite_enable_rtree in the preprocessing definition

Sqlite_enable_column_metadata

Compiling Osgearth

1, decompression osgearth_2.7, CMake fill in the source code and build path.

2. After selecting the target version, configure the CMake

      

(1) configuration osg_dir corresponds to OSG compiled Library folder, folder includes Bin,include,lib. Click Configure.

(2) Configure the include and Lib corresponding to curl, zlib, Minizip, Gdal. Lib may include debug and release; Library is the use of OSG 3rdparty_vs2012.3_v110_x86_x64_v8b_full.7z

(3) Configure the Include and Lib for GeoS and SQLITE3. Where Sqlite3 only configures Release,geos and configures debug lib------geosd.lib

3, click Configure, complete and then click Genetor.

4. Open the OSGEARTH.sln and compile the code. After compiling, the corresponding DLL copy and EXE same directory, you can perform the test.

    

There is no difference between compiling 64 bits and compiling 32 bits, just note that the dependent library corresponds. By configuring the corresponding Earth file in test and setting the test case as the startup item, you can run.

Reference:

http://www.cnblogs.com/geospatial/p/4027696.html GEOS Compilation

Https://trac.osgeo.org/geos/wiki/BuildingOnWindowsWithCMake GeoS

http://zhujiangtao.com/?p=670 SQlite3 Compilation

Http://www.sqlite.org/howtocompile.html SQlite3

Http://docs.osgearth.org/en/latest/startup.html#get-the-source-code Osgearth Build

Osgearth compiling--taking VS2012 as an example

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.