User forums > Using Code::Blocks

"Find declaration of ..." & "Find implementation of ...."

(1/3) > >>

safwen:
Hi everybody!

I am new in C::B,
I am trying to find a way to access the declaration/definition of used types, functions, declarations... in external file (that are not necessary opened)
I noticed that C::b sometimes when try to find the implementation of a function or... it opens the externel file that contains the implementation which is great and very time-saving!
I was on Anjuta before, but Anjuta does not do this for external files, and only refers to files in the same projetc.

The problem is that c::b does not always find the implemetation/declaation of an entity. (Not found:.....)
So how to make c::b find any used  implemetation/declaration in an #included file?
how c::b works exactly to trace used entity.
Should I add libraries or directories, how and under what circumstances.
Should the file be in the project directory?.....
Can Anjuta do the same thing?
I need some clarification, does someone can help?

In fact, I am searching a behaviour like Visual Studio C++ 6, in locating and finding the definition/declarations of externel files.

Thanks for all

lexis:
Seems that you need to define additional search path where CB have to look external sources...

safwen:

--- Quote from: lexis on November 14, 2008, 01:30:03 pm ---Seems that you need to define additional search path where CB have to look external sources...

--- End quote ---

Thanks for the answer, could you be more specific
Thanks :)

mariocup:
Hi safwen,

if you want that the codecompletion and parsing (open include implementation/declaration) works properly then you have to add the path to the search path of the compiler (e.g. Settings->Compiler & Debugger->Search Directories (Tab) for your compiler. This will add this search path globally. If you want to add them only for your project, then you have to select the project built options dialogue and add them to the search directories tab.

Bye,

Mario

safwen:
Thanks guys!
Thanks mariocup

It's working very well on the very cool editor code::blocks,
But there is something missing and I am asking you about it:
For the the calls of embedded functions,types...in libraries, I see that the cb does not recognize them.
It seem to be correct because there is no textcode, implementation visible for these functions,types...
Is it possible at least to find the libray that contains that function, type...?

Ps: compared to eclipse cdt which one is best in codecompletion and parsing?

Thanks

Navigation

[0] Message Index

[#] Next page

Go to full version