1

Is there a way (in C++) to find the system C++ header path according to the OS (Linux, Windows, macOS) and compiler.

For instance, if I'm on Windows I would like find the default C++ header directory used by Visual Studio.

Thanks in advance

C Mars
  • 2,909
  • 4
  • 21
  • 30
ogzu rasa
  • 31
  • 5
  • 2
    Possible duplicate of [Where does Visual Studio look for C++ header files?](https://stackoverflow.com/questions/335408/where-does-visual-studio-look-for-c-header-files) – user0042 Aug 18 '17 at 13:44
  • and for Linux, use `g++ -E -x c++ - -v < /dev/null` – dlmeetei Aug 18 '17 at 13:46
  • Thanks for your response but I want to found the c++ header folder with c++ code lines and not with command line. i.e. found the visual studio version and root intall falder ( idm for mingw, clang, gcc, xcode ...) and deduct the c++ header folder. – ogzu rasa Aug 18 '17 at 15:31
  • You could run that command *from* the code. – HolyBlackCat Aug 18 '17 at 20:25

0 Answers0