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.

C++ APPLICATION PROGRAMMING INTERFACE<br />

• Programming with Motif:<br />

° Getting started with Motif programming<br />

° Motif <strong>ArcGIS</strong> control programming<br />

• Programming with GTK:<br />

° Getting started with GTK programming<br />

° GTK <strong>ArcGIS</strong> control programming<br />

• Event handling on <strong>ArcGIS</strong> controls<br />

• Walkthroughs discussing additional areas of the C++ API can be found in<br />

the developer help system under Development Environments > C++ ><br />

Walkthroughs. They include how to write custom commands, tools, and<br />

events.<br />

• Error handling<br />

INITIALIZING THE SOLARIS AND LINUX ARCGIS ENGINE<br />

With your machine ready for C++ development, there is only a single step to<br />

prepare for <strong>ArcGIS</strong> <strong>Engine</strong> development, and that is to source the /arcgis/init_engine.sh (or .csh, depending on your shell of<br />

choice). If you prefer, that can be done in your shell’s RC file (.cshrc or .bashrc,<br />

for example). Otherwise, you must source that file once per shell.<br />

If you have the engine installed and registered, but you are getting the error<br />

message “Error: Could not open include file .”, try sourcing the<br />

init_engine script.<br />

If your GCC compiler on Linux has not been<br />

installed in a standard location, some of your<br />

compiled applications may not be able to find<br />

libstdc++.so at runtime. In this case, you will<br />

need to add this library’s directory (usually lib)<br />

to your LD_LIBRARY_PATH<br />

environment variable.<br />

You are also able to mix and match by coding in<br />

one development environment and compiling in<br />

another. For example, you can write code in<br />

Visual Studio but compile and build it via a<br />

script utilizing the command-line tools. Keep in<br />

mind, however, that Motif and GTK code will not<br />

compile or run on Windows.<br />

Supported compilers<br />

On Windows, the Visual Studio 6.0 and Visual Studio .NET 2003 compilers are<br />

supported by the <strong>ArcGIS</strong> C++ API.<br />

On Solaris, the Sun Workshop (Forte) 6 update 2 compiler is supported.<br />

On Linux, the supported compiler is GCC version 3.2.<br />

Development environments<br />

As an <strong>ArcGIS</strong> C++ API developer, you can choose any development environment<br />

as long as you use a supported compiler. However, if you want to use an<br />

integrated development environment (IDE) on Windows, either<br />

Visual Studio 6.0 or Visual Studio .NET 2003 (7.1) is recommended. If you<br />

don’t want to use an IDE, you can write your code in any text editor and compile<br />

it from the command line. If you choose this option, it is recommended that you<br />

use the Windows nmake utility, the Solaris make utility, or the Linux make utility,<br />

accessed from the corresponding command prompt. Your choice of development<br />

environment depends entirely on your personal preference and the tools available.<br />

This section focuses on each of these options, as well as the option of using<br />

Motif or GTK in your Solaris and Linux applications.<br />

212 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!