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
a path to the GeoCalc include files
Linking the proper library files and license object into an
application
For applications that take advantage of the GeoCalc User Interface
controls, a link to the UI library files is also required.
Re-building the application to incorporate any needed modifications
Some environments also require the adjustment of other settings. Below,
you can find specific instructions for configuring the following environments:
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"
for the Release configuration or "Multi-threaded Debug DLL"
for the Debug configuration
Under
Project->Properties->Linker
Under General, add
the path to the GeoCalcPBW.lib (GeoCalcPBWd.lib for a Debug configuration)
file and the path to the license.obj file to “Additional Library
Directories” (by default “c:\bmg\lib\GeoCalcPBW[Visual Studio
version]\[Debug | Release], c:\bmg\GeoCalcPBW\lic”).
Under Input, add
GeoCalcPBW.lib (or GeoCalcPBWd.lib) and license.obj to “Additional
Dependencies”. If you are using GeoCalc dialogs you will have
to add GeoCalcPBWUI.lib (GeoCalcPBWUId.lib) as well.
If you are using
a Debug configuration, add msvcrt.lib to the ignore library parameter.
If you are using a Release configuration, add msvcrtd.lib to the
ignore dependency parameter
Close
Visual Studio
Under start->Control
Panel->System->Advanced->Environment Variables
Add the full path
the Dlls that you will be using to the system variable Path (by
default "c:\bmg\GeoCalcPBW\redist[Visual Studio version]\[Debug
| Release]")
Open
Visual Studio and rebuild 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