Lesson 2: Configuring Your Development Environment
Overview
In order to use an integrated development environment (IDE) to build
an application that uses GeoCalc, some settings in the IDE must be adjusted.
This generally
consists of these steps:
Setting the path to the GeoCalc include files
Linking GeoCalcPBW.lib and license.obj into the
application
Re-building the application, so that the updated
settings are applied to the project
Some environments also require the adjustment of other settings. Below,
you can find specific instructions for configuring the following environments:
Microsoft Visual C++
6:
- Under Project->Properties->C/C++
- Under Preprocessor add a path to the GeoCalc
Class Library include directory (by default “c:\bmg\inc”).
- Under Code Generation select "Multi-threaded
DLL" or "Debug Multi-threaded DLL".
- Under Project->Properties->Linker
- Under Input add the path to the GeoCalcPBW.lib
file and the path to the license.obj file to the "Additional library
path" field (by default “c:\bmg\lib, c:\bmg\GeoCalcPBW\lic”).
- Under Input, add GeoCalcPBW.lib and the license.obj
to the “Object/library modules”.
- If you selected "Debug Multi-threaded DLL"
for Code Generation in step 1, then under Input add msvcrt.lib to the
list of "Ignore Libraries"
- Re-build the application.
- See also Special
Considerations for Using GeoCalc with Visual C++ 6.
Microsoft Visual Studio
2003:
- Under Project->Properties->C/C++
- Under General, add the path to the GeoCalcPBW
include directory to “Additional Include Directories” (by default “c:\bmg\inc”).
- Under Code Generation set "Runtime Library"
to "Multi-threaded DLL" or "Multi-threaded Debug DLL"
- Under Language, set “Treat wchar_t as Built-in
Type” to “No”.
- Under Project->Properties->Linker
- Under General, add the path to the GeoCalcPBW.lib
file and the path to the license.obj file to “Additional Library Directories”
(by default “c:\bmg\lib, c:\bmg\GeoCalcPBW\lic”).
- Under Input, add GeoCalcPBW.lib and licence.obj
to “Additional Dependencies”.
- If you selected "Multi-threaded Debug Dll"
as the runtime library in step 1, then under Input, add msvcrt.lib to
the "Ignore Specific Library" field.
- Re-build the application.
Linux and Mac
- Add an include flag to your CFLAGS to the GeoCalc
Class Library include directory
- CFLAGS += -I <path_to_install>/inc
- CXXFLAGS += -I <path_to_install>/inc
- Add a linker flag to add the license object file
and the class library
- LFLAGS += <path_to_license>/license.o
-L <path_to_install>/GeoCalcPBW/redist -l GeoCalcPBW -lGMLCore -lGeoCalc
-lGMLCore -lxerces-c -lxml-security-c -lqt-mt
- Re-build the application.