HP Integrity NonStop H-Series User Manual
Page 32

1.
Select the Car or GeneralCpp project in the NonStop Project Explorer.
2.
Select Properties from the NonStop Project Explorer context menu to open the Properties dialog.
3.
In the Properties dialog, expand C/C++ Build and select Settings to open the Settings page.
4.
In the Settings page, select the Tool Settings tab (if the Tool Settings page is not already
showing).
5.
In the Tool Settings page, select the Includes category under C++ Compiler (TNS/E) to display
Include path (-I) settings (which should be empty).
6.
At the top of the Include path (-I) settings, select the Add... icon (
) to open the Add directory
path dialog.
7.
In the Add directory path dialog, enter one of the following:
../headers
(for Car project)
../include
(for GeneralCpp project)
Builds occur in a subdirectory of the project (typically in a Debug or Release directory); hence,
the include directories are one level up from the build directory.
8.
Select OK to add the include path and dismiss the dialog.
9.
Select OK to apply the change and close the Properties dialog.
You should now be able to build Car and/or GeneralCpp. Skip ahead to
and launching a project (page 33)
if you want to try a build now.
Specifying build variables and environment variables
Build variables and environment variables both provide ways to alter builds. Build variables are
internal to Eclipse and are evaluated prior to creating makefiles and launching a build. Environment
variables, on the other hand, are passed to the shell in which the build is launched.
Build variables and environment variables are easily confused, particularly since CDT automatically
creates build variables for each environment variable set when you launch Eclipse. However,
references to build variables and environment variables are easy to distinguish since build variables
are referenced using curly braces and environment variables are referenced using parentheses.
For example, here are references to PWD in both forms:
${PWD}
— build variable
$(PWD)
— environment variable
NSDEE uses the build macro TARGET_SYSTYPE to pass to compilers and linkers the platform to
build for. For example, if you go back to the Tool Settings tab on the Settings property page and
select the Miscellaneous item for the C++ Linker or the C++ Compiler, you will see this setting:
If you now select the main page for C++ Linker on the Tool Settings page, you'll see that
${TARGET_SYSTYPE}
is evaluated immediately in the All options: box since it shows:
-Wsystype=oss -Wcall_shared
However, if you were to go back and change the -Wsystype= argument to the following
(environment variable syntax instead of build variable syntax) you would see:
Then, when you return to the main page for C++ Linker, the All options: box would then contain:
-Wsystype=$(TARGET_SYSTYPE) -Wcall_shared
In this case, $(TARGET_SYSTYPE) will be evaluated by the shell that does the build and the build
would fail unless you actually set an environment variable to oss or guardian.
32
Getting Started