With Eclipse: How to add include paths and libraries for all your C/C++ project

后端 未结 8 1938
闹比i
闹比i 2020-12-17 09:33

Is it possible to add include paths and libraries to all C/C++ projects? In others words: How can I make them global or copy one C/C++ project build setting to another one?<

8条回答
  •  太阳男子
    2020-12-17 09:48

    Yes, you can, in 2 steps, more user-friendly as the one mentioned by parvus. Both are done in "Project Properties" -> "C/C++ General" -> "Paths and Symbols":

    1. In an existing project where you've already configured the include paths: Highlight the include paths (in the tab "Includes") which you want to copy to the new project and choose "Export". Note that this adds an [Exp] tag to each line.
    2. In the new created project: In the "References" tab, tick the checkbox of the just mentioned project and when you switch back to the "Includes" tab, you see that all the paths you've just exported appear there.

    Referencing the libraries works the same way.

    Also have a look at:

    • the Eclipse Juno Documentation to this topic,
    • a related StackOverflow question

提交回复
热议问题