Author Topic: Right-Clicking a function to find its Declaration/Implementation/All References  (Read 3719 times)

Offline blipton

  • Multiple posting newcomer
  • *
  • Posts: 12
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.

« Last Edit: October 29, 2015, 09:37:58 pm by blipton »

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
there is a plugin for this. its called cscope or similar
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blipton

  • Multiple posting newcomer
  • *
  • Posts: 12
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

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
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.