Author Topic: Function list & #define  (Read 4878 times)

Offline blinde

  • Single posting newcomer
  • *
  • Posts: 4
Function list & #define
« on: September 09, 2010, 09:31:36 am »
Hello

I have some code :

#ifndef TITI
void func()
{

}
#endif

...

#ifdef TITI
void func()
{

}
#endif

I use an external makefile where I define TITI.
So the function I use is the second one.

In the function list of my file, I see the function func()
But it points on the first one. (not the good one)

Is there a way to inform Codeblocks that TITI is defined and that should force it to point on the second function ?

Thanks

Chris


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Function list & #define
« Reply #1 on: September 09, 2010, 09:54:16 am »
Is there a way to inform Codeblocks that TITI is defined and that should force it to point on the second function ?
The C::B version of the code completion branch handles that just fine. This will be available through the nightlies probably soon.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Function list & #define
« Reply #2 on: September 09, 2010, 09:56:28 am »
Is there a way to inform Codeblocks that TITI is defined and that should force it to point on the second function ?
The C::B version of the code completion branch handles that just fine. This will be available through the nightlies probably soon.
I don't think it can be handled if the define is in the makefile, as amkefiles are not parsed by cc.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Function list & #define
« Reply #3 on: September 09, 2010, 10:11:50 am »
I don't think it can be handled if the define is in the makefile, as amkefiles are not parsed by cc.
Oops - you are right, I missed that part. :oops:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ