18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING APPLICATIONS WITH C++ AND CONTROL WIDGETS<br />

The <strong>ArcGIS</strong> developer samples are not included<br />

in the typical installation of the <strong>ArcGIS</strong> <strong>Engine</strong><br />

<strong>Developer</strong> Kit. If you do not have them installed,<br />

rerun the <strong>Developer</strong> Kit Install wizard, click<br />

Custom or Modify, and click the samples feature<br />

under Software <strong>Developer</strong> Kit.<br />

The GTK implementation can be found in the<br />

same directory in<br />

Building_an_<strong>ArcGIS</strong>_controls_Map_Viewer_<br />

ApplicationGTK_cpp.zip.<br />

In GTK C++ you would include ArcSDK.h and<br />

Ao/AoGTKControls.h. You would use libarcsdk.so,<br />

libgtkctl.so, and libaoctl.so. GTK developers will<br />

also need to link against some GTK libraries and<br />

include some GTK-specific directories. It is<br />

recommended that pkg-config be used for this.<br />

These steps are shown in the provided<br />

Makefile.SolarisGTK.Template and<br />

Makefile.LinuxGTK.Template.<br />

• Your favorite text editor.<br />

• A supported C++ compiler.<br />

o Solaris: Sun WorkShop (Forte) 6 update 2<br />

o Linux: GCC version 3.2<br />

• A configured C++ environment (for example, your compiler configured and<br />

your path set). To test this, see ‘Pre-ArcObjects C++ configuration steps’ in<br />

Chapter 4, ‘Development environments’.<br />

• A configured ArcObjects environment. To get your machine ready for<br />

ArcObjects development, you must source the file /<br />

init_engine.sh (or .csh, depending on your shell of choice). If you prefer, that<br />

can be done in your shell’s RC file. Otherwise, you must source that file for<br />

each shell.<br />

• Familiarity with your operating system and a basic foundation in both C++<br />

and Motif programming. Although this scenario uses the Motif toolkit, it is<br />

not intended to teach the basics of Motif programming. For Motif-specific<br />

details, see the Motif Programming Manual resource listed at the end of this<br />

example.<br />

• While no experience with other ESRI software is required, previous experience<br />

with ArcObjects and a basic understanding of <strong>ArcGIS</strong> applications, such<br />

as ArcMap and ArcCatalog, are advantageous.<br />

• Access to the sample data, code, and makefiles that come with this scenario.<br />

Code and makefiles are located at /developerkit/<br />

Building_an_<strong>ArcGIS</strong>_Controls_Map_Viewer_ApplicationMotif_Cpp.zip. The<br />

sample data is located at /developerkit/samples/data/<br />

arcgis_engine_developer_guide.<br />

The controls and <strong>ArcGIS</strong> libraries used in this scenario are as follows:<br />

• MapControl<br />

• PageLayoutControl<br />

• TOCControl<br />

• ToolbarControl<br />

• Carto Object Library<br />

• System Object Library<br />

• Display Object Library<br />

• SystemUI Object Library<br />

• Geometry Object Library<br />

In Motif C++, you must include the following files to use those controls and<br />

object libraries:<br />

• ArcSDK.h<br />

• Ao/AoMotifControls.h<br />

Chapter 6 • <strong>Developer</strong> scenarios • 359

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!