How to attach source to the libraries on Eclipse CDT

家住魔仙堡 提交于 2019-12-21 04:53:22

问题


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

  1. right click on the folder name
  2. click on rescource configurations
  3. select exclude from build


来源:https://stackoverflow.com/questions/6784543/how-to-attach-source-to-the-libraries-on-eclipse-cdt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!