12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6<br />

184 Day 6<br />

TIP<br />

The keyboard shortcut for Make is Ctrl+F9.<br />

The Build All option takes the longest to perform. This option compiles every unit <strong>in</strong> the<br />

project regardless of whether it has changed s<strong>in</strong>ce the last build. After compil<strong>in</strong>g all units,<br />

<strong>C++</strong>Builder l<strong>in</strong>ks the entire project. So far we have been lett<strong>in</strong>g <strong>C++</strong>Builder add units to our<br />

projects. Further on down the road you may have to do some hand edit<strong>in</strong>g of your source files<br />

to add headers and other needed directives. You may even end up edit<strong>in</strong>g the makefile. From<br />

time to time, you know, th<strong>in</strong>gs can get goofed up (we all make mistakes). Perform<strong>in</strong>g a Build<br />

All will br<strong>in</strong>g everyth<strong>in</strong>g up-to-date so you can better sort out any problems you might be<br />

runn<strong>in</strong>g <strong>in</strong>to. Sometimes a Build All will resolve compiler and l<strong>in</strong>ker errors without requir<strong>in</strong>g<br />

you to do anyth<strong>in</strong>g further.<br />

TIP<br />

Any time you get unexpected (out of the ord<strong>in</strong>ary) compiler or l<strong>in</strong>ker<br />

errors, first try a Build All. It could just be that someth<strong>in</strong>g is out of<br />

sync, and a Build All may cure it. If perform<strong>in</strong>g a Build All doesn’t fix<br />

the problem, you’ll have to go to work figur<strong>in</strong>g out where the problem<br />

lies.<br />

Regardless of the method chosen to compile the project, if errors are detected the compile<br />

status dialog box will report There are errors. and will list the number of errors that were<br />

detected as well as any warn<strong>in</strong>gs. Figure 6.9 shows the compile status dialog box after errors<br />

are detected.<br />

Figure 6.9.<br />

The compile status<br />

dialog box show<strong>in</strong>g<br />

warn<strong>in</strong>gs and errors.<br />

After you click OK to dismiss the compile status dialog box, the Code Editor will come to<br />

the top with the first error l<strong>in</strong>e highlighted. The message w<strong>in</strong>dow at the bottom of the Code<br />

Editor is displayed, and the errors and warn<strong>in</strong>gs are listed there. After a successful Compile<br />

Unit, Make, or Build All you can immediately run the program via the Run button if you<br />

choose.

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

Saved successfully!

Ooh no, something went wrong!