Page 1 of 1

Same function name in different file

Posted: Wed Feb 18, 2009 2:07 pm
by gerardpuducul
Hi Eran,

if I have the same function name in different file codelite doesn't display the function in the outline windows. I use different target for my compilation so depending of my target i compile different file (but the name of function in these file are identical)

I have try to create separate project for each target but the problem il always present.

Is it normal?

PS: I don't know if i am clear, i can send you an example of workspace if you want.

thanks

Re: Same function name in different file

Posted: Wed Feb 18, 2009 3:52 pm
by eranif
gerardpuducul wrote:Is it normal?
It is normal behavior since codelite will not insert the same function name of the same scope into the database (I deinfed a unique constraint of function name + scope + signature).

It will be inserted only once into the database.

Eran

Re: Same function name in different file

Posted: Wed Feb 18, 2009 4:39 pm
by gerardpuducul
So my only solution is to create a workspace for each target?? :cry: :cry:

Re: Same function name in different file

Posted: Wed Feb 18, 2009 4:48 pm
by eranif
Why do u need to create the same function for each target? I think that this is a wrong build design choice.

A better solution is maybe adding some macros for each target, and under the same method, if #if/defs

Eran

Re: Same function name in different file

Posted: Wed Feb 18, 2009 6:49 pm
by gerardpuducul
Yes you are true but i have added my code to an existing code with all his history and with this kind of rules.

No choise!! :cry: :cry:

Anyway i will create one workspace by target.. Not very friendly but............no choise!! :cry: :cry: