Following are the global settings that we have to do in Eclipse IDE. We don't need to do these settings for each project. These are only one-time settings.
- Launch Eclipse IDE from the Ubuntu search bar.
- Go to Window | Preferences. from the Preferences Window, choose C/C++ | Build | Settings and then choose the Discovery tab. Select CDT GCC Build Output Parser [Shared]. Select the Compiler command pattern to (.*gcc)|(.*[gc]++)|(.*clang). Also check the Project option that is a part of Container to keep discovered entries. Click on the Apply button and then on the OK button to confirm the settings. These settings enable eclipse to find C++ 11 traits inside the package. The settings are shown in the following screenshot:
![](http://imgdetail.ebookreading.net/hardware/2/9781788627436/9781788627436__ros-programming-building__9781788627436__assets__c57de02c-bc0f-4e1f-b539-75ca7b2c7f1f.png)
Figure 2: Settings inside Eclipse Preferences
- In the next step, click on the CDT GCC Built-in Compiler Settings [ Shared ] option from the Discovery tab and change the entry under Command to get compiler specs to ${COMMAND} -E -P -v -dD -std=c++11 "${INPUTS}".
![](http://imgdetail.ebookreading.net/hardware/2/9781788627436/9781788627436__ros-programming-building__9781788627436__assets__d3b3a9a6-15d4-49b9-9aa3-f8c3a04c05b6.png)
Figure 3: Eclipse Compiler settings