13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User 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.

Chapter 5. Using the C++ CompilerThis chapter describes the compilation process and explains how to call the C++ compiler. You shouldbe familiar with the C++ language and with the ISO C language.The C++ compiler can be seen as a preprocessor or front end which accepts C++ source files or sourcesusing C++ language features. The output generated by the C++ compiler (cparm) is intermediate C,which can be translated with the C compiler (carm).The C++ compiler is part of a complete <strong>toolset</strong>, the <strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong>. For details about theC compiler see Chapter 4, Using the C Compiler.The C++ compiler takes the following files <strong>for</strong> input and output:Although in Eclipse you cannot run the C++ compiler separately from the other tools, this section discussesthe options that you can specify <strong>for</strong> the C++ compiler.On the command line it is possible to call the C++ compiler separately from the other tools. However, itis recommended to use the control program <strong>for</strong> command line invocations of the <strong>toolset</strong> (see Section 10.1,Control Program). With the control program it is possible to call the entire <strong>toolset</strong> with only one commandline. Eclipse also uses the control program to call the C++ compiler. Files with the extensions .cc, .cppor .cxx are seen as C++ source files and passed to the C++ compiler.The C++ compiler accepts the C++ language of the ISO/IEC 14882:2003 C++ standard, with some minorexceptions documented in Chapter 2, C++ Language. It also accepts embedded C++ language extensions.The C++ compiler does no optimization. Its goal is to produce quickly a complete and clean parsed <strong>for</strong>mof the source program, and to diagnose errors. It does complete error checking, produces clear errormessages (including the position of the error within the source line), and avoids cascading of errors. Italso tries to avoid seeming overly finicky to a knowledgeable C or C++ programmer.5.1. Calling the C++ CompilerUnder Eclipse you cannot run the C++ compiler separately. However, you can set options specific <strong>for</strong> theC++ compiler. After you have built your project, the output files are available in a subdirectory of yourproject directory, depending on the active configuration you have set in the C/C++ Build » Settings pageof the Project » Properties <strong>for</strong> dialog.Building a project under EclipseYou have several ways of building your project:171

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

Saved successfully!

Ooh no, something went wrong!