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

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

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

370 Day 10<br />

You can set the Pre-compiled Headers option to None, Use pre-compiled headers, or Cache<br />

pre-compiled headers depend<strong>in</strong>g on your needs and the hardware available on your system.<br />

Generally speak<strong>in</strong>g, you will use pre-compiled headers <strong>in</strong> one way or another. Turn<strong>in</strong>g off<br />

pre-compiled headers almost always results <strong>in</strong> much slower build times.<br />

TIP<br />

The option to cache pre-compiled headers will dramatically speed up<br />

compile and build times if you have enough system RAM. If you do<br />

not have enough system RAM, cach<strong>in</strong>g pre-compiled headers can<br />

actually slow down your builds. Do your own tests to determ<strong>in</strong>e<br />

whether cach<strong>in</strong>g of pre-compiled headers is faster or slower on your<br />

system. In general, though, I would recommend turn<strong>in</strong>g cach<strong>in</strong>g off if<br />

you have less than 32MB of system RAM.<br />

Compil<strong>in</strong>g<br />

The Compil<strong>in</strong>g group of options on the <strong>C++</strong> page is used to control how the <strong>C++</strong> compiler<br />

performs certa<strong>in</strong> options. For the most part, you should leave these options set at the defaults<br />

until you get more familiar with <strong>C++</strong>Builder and <strong>C++</strong> <strong>in</strong> general. These sett<strong>in</strong>gs are expla<strong>in</strong>ed<br />

<strong>in</strong> the follow<strong>in</strong>g sections.<br />

Merge Duplicate Str<strong>in</strong>gs<br />

When the Merge Duplicate Str<strong>in</strong>gs option is on, it tells the compiler to merge duplicate<br />

str<strong>in</strong>gs <strong>in</strong>to one memory location. This saves overall program size but can lead to problems<br />

if one of the str<strong>in</strong>gs is modified.<br />

Stack Frames<br />

Leave the Stack frames option on when debugg<strong>in</strong>g. When you are done debugg<strong>in</strong>g, you can<br />

turn off this option to have the compiler generate smaller and faster code, but compile times<br />

will be slightly longer with the Stack frames option off. Most of the time the speed and size<br />

sav<strong>in</strong>gs are not significant enough to warrant turn<strong>in</strong>g off this option. As always, do your own<br />

test to be sure.<br />

Show Warn<strong>in</strong>gs<br />

When the Show warn<strong>in</strong>gs option is on, any compiler warn<strong>in</strong>gs are displayed <strong>in</strong> the Code<br />

Editor message w<strong>in</strong>dow. I always leave this option on. Compiler warn<strong>in</strong>gs should not be<br />

ignored for the long term. Most of the time compiler warn<strong>in</strong>gs can, and should, be resolved.

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

Saved successfully!

Ooh no, something went wrong!