Compilation of Windows under OSGEarth

1. dependence

Compile OSGEarth is quite simple, the first is to get the compiler dependent.

1) OpenSceneGraph

OSGEarth is OpenSceneGraph extension library compilation process can be found in my other article: Win64 compiler OSG detailed process (Win10 + VS2015 + OSG3.6.3) .

2) GDAL

Common space for reading and writing data set of cross-platform open source libraries, OSGEarth a lot of support for spatial data GDAL is achieved. Compilation process: Win64 compiler integration of GDAL GEOS and Proj4 .

3) CURL

Network file transfer library, with online mapping service related. It is also dependent on third-party library OpenSceneGraph, directly take over with it.

4) GEOS

GEOS is a collection of practical operation shaped topology library. osgEarth GEOS performed using as buffering and cross a geometric operation. Although it is optional and dependent libraries, in order to use the full functionality of vector elements, it suggested adding this library. Compilation process: Debug version of VS2015 compile and release of GEOS .

5) Other

Compiled in the official help documentation which also mentions SQLite and QT. SQLite database files should be of some use when it is used, the scope should be small. The current version should not rely on QT components, anyway, I do not see the translation parameters, it is necessary to use osgEarth in the QT, you can use osgQT.

2. Compile

1) Set parameters

Open the CMake, in "Where is the source code" fill in the source directory, in the "Where to build the binaries" fill in the project build directory, then click "Configure", as shown below:

Note that the first "Configure" time the compiler will let you choose, I choose here is the VS2015's X64 compiler.

2) Path Configuration

The first configuration is generally unsuccessful, it will prompt the lack of dependent libraries. This time can depend on the path followed by fill, re "Configure" on it. I'm here to fill in the path of reference as follows:


OSG has a lot of sub-libraries, so if you own one, then fill in cumbersome. There is a fast way, according to the first embodiment following FIG tissue clip file C, are placed in the file header include child file, to a file in lib lib subfolder inside (debug and release can be). Then fill in the folder C compiler to OSG_DIR items, and finally again "Configure", can help you automatically identify the relevant path.

3) A compiled

Fill in the configuration process can be side edge "Configure", until finally no longer prompt the lack of appropriate dependencies. As shown below, suggesting "configuring done" (prompt warning is not necessary and the absence of assembly).

Then click "Generate", generate VS project, click on the "Open Project" to open the project. In the last generation VS solution, wait compiled it.

3. References

  1. Building osgEarth
  2. osgearth compile the whole process

Guess you like

Origin www.cnblogs.com/charlee44/p/11109252.html