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:
Installing the DataSourceComponent
in the development environment
Dropping the DataSourceComponent
into a project
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:
Visual Studio 2003 - C++.NET
- Create a new C++.NET application.
- In a text editor, such as Notepad, create a file
called licenses.licx that contains the line “GeoCalcNET.DataSourceComponent,
GeoCalcNET” (without the quotes). Save
this file to the output director for your project.
- Copy GeoCalcNET.dll and GeoCalcNET.lic into the output
director of your project (by default these can be found in c:\bmg\GeoCalcNET\redist\).
- Go to the output directory of your project and run
the command “lc /target:<application name>.exe /complist:licenses.licx
/i:GeoCalcNET.dll”, where <application name> is a place holder for
the name of your application. This
command will generate a file called <application name>.exe.licenses.
- In you project properties, Configuration Properties->Linker->Input->Embed
Managed Resource File, add the path and filename of the file generated
in Step 4.
- Add a reference to GeoCalcNET.dll to your project.
- Select Project->Add Reference…
- Select the .NET tab.
- Click the Browse button and browse to GeoCalcNET.dll
(by default c:\bmg\GeoCalcNET\redist\GeoCalcNET.dll).
- Build the application.
Visual Studio 2003 - C#.NET or VB.NET
- Create a new C#.NET or VB.NET Windows Application.
- Right-click on the Toolbox and select Add/Remove
Items…
- Select the .NET tab and click the Browse button.
- Browse to GeoCalcNET.dll (by default c:\bmg\GeoCalcNET\redist\GeoCalcNET.dll)
and open this file.
- Click OK in the Customize Toolbox dialog.
- There will now be a new item in the Toolbox called
DataSourceComponent. Drag
this onto a form.
- Build the application.