Problems finding or opening the include file "ArcSDK.h"
If your sample is not compiling because it cannot open ArcSDK.h, make sure that you have the correct argument for the include directory. If you installed to the default directory, it should be either \Program Files\ArcGIS\DeveloperKit10.0\include\CPPAPI (for Windows) or /arcgis/include (for Linux and Solaris). If it is correct and it is still not working, make sure the file is in that directory.
If it is in the correct location and you are using either Solaris or Linux, the next thing to try is running arcgis/init_engine.sh (or .csh). The message may mean that $AGSDEVKITHOME/include isn't in the compiler's include path. In the samples, our makefiles typically take care of adding this for you. However, if $AGSDEVKITHOMEisn't set, it will fail, and it is set in the arcgis/engine10.0/init_engine script.
Error: Please define either ESRI_WINDOWS or ESRI_UNIX
You need to inform the compiler of which set of header files to use. On Windows, you need to define the ESRI_WINDOWS symbol. On Solaris and Linux, you need to define the ESRI_UNIX symbol. If you are using a makefile (either with nmake on Windows or make on Solaris or Linux), you will set this with the "D" compiler flag. In Visual Studio 2008, the symbol is defined in the Project Menu > Properties dialog box in the C/C++ folder by clicking Preprocessor and adding "ESRI_WINDOWS" to the Preprocessor Definitions textbox.
Windows-Specific Errors
- Cannot open type library file esriSystem.olb
This Windows error means that your sample is not compiling because it cannot open an ESRI OLB file. Make sure that you have the correct argument for the COM include directory, which is ArcGIS\Engine10.0\com in a default installation. If it is correct and it is still not working, make sure the file is in that directory. - Code is compiling but will not run. Sometimes I get an odd "abnormal program termination" error.
On Windows, if samples or your own code compiles but fails to run, make sure you registered your ArcGIS Engine. Run the SoftwareAuthorization tool found in Start > All Programs > ArcGIS and follow its prompts.
Solaris- and Linux-Specific Errors
- Error: No valid runtime license was found.
This means that you have not registered your ArcGIS Engine. Run the SoftwareAuthorization tool found in arcgis/authorizeSoftware and follow its prompts.
- fatal: libarcsdk.so: open failed: No such file or directory (Solaris)
OR
/usr/bin/ld: cannot find -larcsdk (Linux)
This tells you that $AGSDEVKITHOME/bin isn't in the LD_LIBRARY_PATH, which is set up when you run the arcgis/engine10.0/init_engine.sh (or .csh) script. Run the init_engine script.
- Getting lots of warnings about invalid characters in TextField widgets, and the Motif file selection dialogs are not working correctly.
This is a Linux error relating to a bug in RedHat's Motif. To get rid of the warnings, you can set the LANG environment variable to C (either each time you open a new shell, or in your shell's configuration file).