Graphics Programs Reference
In-Depth Information
We call errors generated during this phase
compile-time errors
or
syntax errors
. Compile-
time errors are typically misplaced semicolons, unbalanced square brackets ([]) or curly
ones ({}), spelling or capitalization errors.
These types of errors also occur when you use a class that hasn't been declared. To see an
example of a compile-time error, comment out the following line in
Wheream-
iViewController.h
:
//
#import <CoreLocation/CoreLocation.h>
Build the application again, and the compile phase will fail. To see the problem up close,
click the icon to open the issue navigator or hit Command-4. This navigator shows you
any errors or warnings in your code (
Figure 4.17
). You can click on an individual error to
see the line of code that generated the error.
Figure 4.17 Build results with compile-time error
Before you removed the import statement, the intermediate file created from
Wheream-
iViewController.m
contained the code from
CoreLocation.h
, which contained
the interface declaration for
CLLocationManager
and the protocol declaration for
CLLocationManagerDelegate
. Without the import statement, these files do not be-