News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Code navigation in thrid-party library

Started by Alatar, April 05, 2013, 09:53:36 PM

Previous topic - Next topic

Alatar

How can I point CB to location of the library sources to get ability to use "Find implementation" for this library functions in my project?

oBFusCATed

It should follow the includes in you project automatically. So there are no setup requirements.
(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!]

Jenna

#2
But if the implementation is in a source-file and not in a header, you will need the sources so the CodeCompletion-plugin (which offers this functionality) can parse them.
And they must be either part of your project or in a project which is also opened in the same workspace as your project.
In this case you need to switch on the option to parse the whole workspace (as far as I know).

But find declaration should work in any cases,because to use the lib, you also need the include headers anyway.
Note, this will probably not work (correctly) with templates and if you use something like pkg-config or wx-config.

Alatar

So there is no options to force CC to parse files that is not in my project or workspace? May this feature be realised in future?
By the way feature to point CC real location of the headers and defining of preprocessor symbols like -DUSE_BLABLA is would be useful too in cases when I use "pkg-config or wx-config" or external Makefiles.

Jenna

Parsing external makefiles is no option for CC.
There is no common way to search for special stuff.

Header files used by your project get parsed already (so "Find declaration" will work in most cases), but the implementation is usually not in the headers, but in the source-files.
And these files are normally not shipped with the development packages.

The stuff provided by wx-config and pkg-config might get parsed already, I'm not sure about this.

Alatar

Quote from: jens on April 06, 2013, 02:38:11 PM
Parsing external makefiles is no option for CC.
There is no common way to search for special stuff.
I don't suggest to parse Makefiles, I`m suggest to add option to manually specify some path and defines to CC.

Quote from: jens on April 06, 2013, 02:38:11 PM
Header files used by your project get parsed already (so "Find declaration" will work in most cases), but the implementation is usually not in the headers, but in the source-files.
And these files are normally not shipped with the development packages.
I`m knew difference between headers and sources ;) I'm want to have ability to find implementation of functions in libraries with sources. For example in wxWidgets.

Jenna

For parsing additional includes see "Project -> Properties -> C/C++ parser options".
As fa as I know, there is no option (yet) to parse additional sources.

But this might be a useful feature request.

Alatar

Thanks jens!
I will open corresponding feature request.