18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C++ APPLICATION PROGRAMMING INTERFACE<br />

1. Open a command prompt and use the “cd” command to change to the<br />

directory containing vcvars32.bat.<br />

2. Type “vcvars32.bat” to run the batch file.<br />

3. For development, use the “cd” command to change to the directory containing<br />

your code and begin. The Visual Studio command-line build tools<br />

will be available from your command prompt.<br />

4. For execution, run your .exe file with any necessary parameters.<br />

• Create a batch file to run vcvars32.bat for you.<br />

1. Navigate to the directory in which you want to store the batch file.<br />

2. Right-click in the directory and click New > Text Document.<br />

3. Change the name of the file to end in .bat (cmdpromptdevel.bat, for example)<br />

and click Yes to confirm the name change.<br />

4. Right-click the file and click Edit.<br />

5. Find vcvars32.bat, right-click the file, and click Edit.<br />

6. Copy all of the text in vcvars32.bat into the batch file you created and<br />

opened above, and close vcvars32.bat.<br />

7. Add the following line to your batch file:<br />

%SystemRoot%\system32\cmd.exe<br />

This line opens a command prompt.<br />

8. When you want to develop from the command line, double-click your<br />

batch file. A command prompt will open with the necessary environment<br />

already set up for you. You can also create a shortcut to your batch file and<br />

add it to the Start menu or a toolbar.<br />

9. For development, use the “cd” command to change to the directory containing<br />

your code and begin. The Visual Studio command-line build tools<br />

will be available from your command prompt.<br />

10. For execution, run your .exe file with any necessary parameters.<br />

Accessing the Visual Studio .NET 2003 compiler from the command<br />

line<br />

The command-line build tools of Visual Studio are not available by default.<br />

However, Visual Studio .NET 2003 includes a command prompt that makes the<br />

tools available. To open the command prompt and access these tools, go to the<br />

Start menu > All Programs > Microsoft Visual Studio .NET 2003 > Visual<br />

Studio .NET Tools > Visual Studio .NET 2003 Command Prompt.<br />

When opened, the prompt automatically runs a batch file, vcvars32.bat, that<br />

makes the build tools available. The vcvars32.bat file’s default location is<br />

\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin.<br />

Setting up your application<br />

Open your favorite text editor and begin writing your code. Use a makefile to set<br />

the following include directories and compiler options.<br />

Chapter 4 • <strong>Developer</strong> environments • 215

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

Saved successfully!

Ooh no, something went wrong!