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 />

° GTK <strong>ArcGIS</strong> control applications with the make utility<br />

Once you have read that documentation, continue with Step 2.<br />

2. Now that you know what platform you will be developing on, install the<br />

<strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Kit on that platform, if you have not done so<br />

already. Make sure to register your <strong>ArcGIS</strong> <strong>Engine</strong>!<br />

3. Before beginning with a new API, it can be helpful to have some idea why<br />

things might not be working. Some of the common configuration mistakes are<br />

covered in the ‘Troubleshooting’ section in this chapter.<br />

4. You should now have a computer configured for C++ development and know<br />

how to set up, compile, and run ArcObjects C++ code in your development<br />

environment of choice. The next step is to become familiar with ArcObjects<br />

and the C++ API.<br />

Getting to work<br />

1. If you are programming on either Solaris or Linux, you now need to initialize<br />

your <strong>ArcGIS</strong> <strong>Engine</strong>.<br />

You should also be aware that if a C++ API application crashes on Solaris or<br />

Linux, you need to run mwcleanup, as discussed in ‘Solaris and Linux postcrash<br />

cleanup’ in this chapter.<br />

2. ArcObjects is based on the Microsoft Component Object Model, or COM, and<br />

successful ArcObjects programming requires a basic understanding of COM.<br />

Read ‘Building an understanding of COM and ArcObjects’ earlier in this<br />

chapter for information on developing COM knowledge and the <strong>ArcGIS</strong><br />

system. The resources in that document are only a brief introduction. A more<br />

complete understanding of the ArcObjects system can be developed through<br />

the overviews in the Library Reference for each of the <strong>ArcGIS</strong> libraries and<br />

by taking ESRI courses targeted at ArcObjects programmers.<br />

3. Now you will begin to get into the details of the ArcObjects C++ API. To get<br />

started, step through one of these walkthroughs. The walkthrough you complete<br />

should reflect your ArcObjects C++ goals:<br />

• For command-line application programmers (Windows, Solaris, or<br />

Linux): See the section ‘Building a command-line C++ application’ in<br />

Chapter 6.<br />

• For <strong>ArcGIS</strong> control application programmers (Solaris or Linux): See the<br />

section ‘Building applications with C++ and Motif widgets’ in Chapter 6.<br />

4. You should now be able to write your own applications using the ArcObjects<br />

C++ API. If you are programming on either Solaris or Linux, or if you are<br />

programming on Windows using the Visual Studio command-line tools, you<br />

will need to write a makefile to go with your application. Template makefiles<br />

have been provided for your use. Select the makefile appropriate for your<br />

developer environment and modify it as discussed in the platform configuration<br />

document you were directed to above.<br />

• Windows command-line programming with nmake<br />

• Solaris command-line programming with make<br />

210 • <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!