You can configure the location of include, source, and
build files for a C++ project. You can also configure the C++ project
to build automatically when you edit a .hpp or
a .cpp file.
Procedure
- Configure the include path of the C++ project.
- In the Project Explorer view, right-click the C++ project
that you created, and click Properties.
- Expand C/C++ General and select Paths
and symbols.
- On the Includes tab, under Languages,
select GNU C++, and then click Add.
- In the Add Directory Path window,
click Workspace.
- Select the include folder from the
C++ project, and then click OK.
- Configure the source location for the C++ project.
- In the Project Explorer view, right-click the C++ project
that you created, and click Properties.
- Expand C/C++ General and select Paths
and symbols.
- On the Source Location tab, click Link
Folder.
- Select the Link to folder in file system option.
- Click Browse to select the SPL
Project/impl/src as the source directory.
- Configure the build directory for the C++ Project.
- In the Project Explorer view, right-click the C++ project
that you created, and click Properties.
- Select C/C++ Build.
- On the Builder Settings tab, make sure the Generate Makefiles automatically option is not selected.
- In the Build directory field,
specify SPL Project/impl as
the build directory.
- Optional: Build the C++ project automatically
when a .cpp or .hpp file
is changed:
- In the Project Explorer view, right-click the C++ project
that you created, and click Properties.
- Expand C/C++ Build.
- On the Behavior tab, select the Build on resource save (Auto build) option.