Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: blipton on October 29, 2015, 09:36:17 pm

Title: Right-Clicking a function to find its Declaration/Implementation/All References
Post by: blipton on October 29, 2015, 09:36:17 pm
I've opened all the .c source/header files in a directory, but I still can't get CB to find the implementation of functions  (It works if I do a Find In Files)

Do I need to create a dummy project, add all the source/header files?   Or can it work simply be searching all the files in the current folder (ideal) or searching all the open files in CB (still good)?

This feature BTW, seems quite elusive..  I know Eclipse, Qt Creator, and Visual Studio Code/Community can all do this, but a c/c++ project has to be created every time. I'd much prefer a lightweight editor, with no compiler bloat, where any file can be opened and a function tree is mapped across the files in the same directory, without resorting to "Find In Files" or other 4 button/click combination.

I've tried other editors trial version (Ultraedit with ctags plugin, Slickedit, QtCreator, Netbeans IDE, Sublime3, Brackets.io) but for one reason or another doesn't do what I've described above.

Title: Re: Right-Clicking a function to find its Declaration/Implementation/All References
Post by: frithjofh on October 29, 2015, 10:31:29 pm
there is a plugin for this. its called cscope or similar
Title: Re: Right-Clicking a function to find its Declaration/Implementation/All References
Post by: oBFusCATed on October 30, 2015, 07:25:47 am
C::B is an IDE, so it require projects. It works to some extent without one, but it will work better if you create a project.
Title: Re: Right-Clicking a function to find its Declaration/Implementation/All References
Post by: blipton on October 30, 2015, 07:16:55 pm
there is a plugin for this. its called cscope or similar

Thanks, I see the wiki page for the plugin,
http://wiki.codeblocks.org/index.php?title=Cscope_plugin

But can't find a download/install link...  there's a windows binary build (.exe) available, but is that the same as the CB plugin?
https://code.google.com/p/cscope-win32/downloads/list
http://cscope.sourceforge.net/#downloads
Title: Re: Right-Clicking a function to find its Declaration/Implementation/All References
Post by: scarphin on October 30, 2015, 11:25:59 pm
You have to install cscope first then configure cb so that it knows where to find cscope. The plugin itself is included in cb, you don't have to do anything special about it other then configuring it.

Last but most important, please read what obfuscated wrote again.