0

I am using eclipse mars to code c++ projects. Lately I installed g++-8 to use the new cpp17 features.

I changed the settings window->preferences->C/C++->build->settings->discovery->"CDT GCC built-in compiles settings" to ${COMMAND} -std=c++17 ${FLAGS} -E -P -v -dD "${INPUTS}" (I changed -std=c++11 to 17)

What else do I need to change to allow eclipse to find cpp17 related include files like < optional>?

Thank you

greg-449
  • 109,219
  • 232
  • 102
  • 145
Epic
  • 572
  • 2
  • 18
  • Maybe you need to point it at your new compiler? Try changing `${COMMAND} -std=c++17 ${FLAGS} -E -P -v -dD "${INPUTS}` to `/path/to/new/compier/bin/g++8 -std=c++17 ${FLAGS} -E -P -v -dD "${INPUTS}`. – Galik Jul 04 '18 at 08:41
  • I changed the g++ and gcc symlinks to point to the new binnary so it goes to correct place. I tried your way also but same result – Epic Jul 04 '18 at 15:09
  • It is possible your project is overriding the default settings that you changed. You can alter the project specific settings following the instructions here: https://stackoverflow.com/questions/17131744/eclipse-cdt-indexer-does-not-know-c11-containers/24628885#24628885 Maybe that will help? – Galik Jul 04 '18 at 15:17

0 Answers0