问题
On Eclipse CDT, does someone know how to have the external libraries attached by their source codes?
What I want to do is to click the element (e.g. function, variable) names so that Eclipse opens the corresponding part of its source file (or open header file initially, then open source with another click in header). It's possible in Eclipse' Java mode.
Thanks.
回答1:
Create a library project. Add external library into it. Open library project Properties, link sources folders via C/C++ General/Paths and Symbols/Source location. Open main project Properties and add library project to Project References.
If you did everything right, Open Declaration action (F3) will open a function sources.
Cheers, Max
回答2:
In the project explorer you can
- right click on the folder name
- click on rescource configurations
- select exclude from build
来源:https://stackoverflow.com/questions/6784543/how-to-attach-source-to-the-libraries-on-eclipse-cdt