User forums > Using Code::Blocks

Finding decleration/implementation of a function/class in C++ using CodeBlocks I

<< < (2/2)

slalom3:

--- Quote from: BlueHazzard on June 05, 2016, 02:34:50 am ---
--- Quote from: slalom3 on June 04, 2016, 09:38:18 pm ---Also,name of environmental variable is "STIM_PATH", I don't know why you ask this!! since it could be anything and it is found by the compiler.

--- End quote ---
I wanted to know if you manipulated the environment variable that goes straight to the compiler and not trough codeblocks. Because if you had done this, code blocks would have had no chance to detect the paths but compilation would have worked...

anyway as you say code completion is working, then find declaration should also work, i have no idea what is wrong...May be some one else can help you :)

clang cc is a alternative code completion plugin, that bases on the clang code parser...  On this links is somewhere written where you can get a pre build plugin, that should work..

greetings

--- End quote ---

Thanks though.

slalom3:

--- Quote from: ollydbg on June 05, 2016, 03:05:17 am ---@slalom3, thanks for the report, but I think the most important thing is: please give a minimal sample project, so that we can test the bugs, otherwise, we can't help much, because we need a way to reproduce this bug.

--- End quote ---

Unfortunately, it is impossible to provide any "minimal sample project". Because like I said I am dealing with a library with nested classes and files.takes a couple of hours to install all the dependencies and compile it.
Sorry for that.
There must be a solution though!

slalom3:
@ollydbg I believe I found the problem!!! :)

look at the code below:

 
--- Code: ---if (header.data_type == envi_header::float32)
return ((bip<float>*)file)->co_matrix(co, avg, mask, PROGRESS);
--- End code ---

co_matrix ia a function and codeblocks cannot find its deceleration/implementation.I think the reason is using"   -> "  !
because it also happens in other similar cases.

Is there any way to solve it?

ollydbg:

--- Quote from: slalom3 on June 05, 2016, 06:18:47 pm ---@ollydbg I believe I found the problem!!! :)

look at the code below:

 
--- Code: ---if (header.data_type == envi_header::float32)
return ((bip<float>*)file)->co_matrix(co, avg, mask, PROGRESS);
--- End code ---

co_matrix ia a function and codeblocks cannot find its deceleration/implementation.I think the reason is using"   -> "  !
because it also happens in other similar cases.

Is there any way to solve it?

--- End quote ---
OK, I see the issue.
The native code completion plugin can't solve this issue. The reason is that handling

--- Code: ---((bip<float>*)file)
--- End code ---
is a bit complex for current implementation.
I mean it need handling operation precedence of an expression.
Hope some one can implement this(an easy way is to use bison), or you can try Clang code completion.  :)

Navigation

[0] Message Index

[*] Previous page

Go to full version