Same function name in different file

General questions regarding the usage of CodeLite
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Same function name in different file

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Same function name in different file

Post 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
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: Same function name in different file

Post by gerardpuducul »

So my only solution is to create a workspace for each target?? :cry: :cry:
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Same function name in different file

Post 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
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: Same function name in different file

Post 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:
Post Reply