#Ifdef access code in eclipse

if code:

#ifdef ABC code(); #endif 

I want to access function code () using Open Declaration. How can I do this without defining ABC in the source code.

+4
source share
3 answers

You can take a look at this entry. How can I get Eclipse to index the code inside #ifdef ... #endif

Regarding .h files, make sure Indexer is installed to index header files that are not Project-> Properties-> C / C ++ General β†’ Indexer, and check "Index source files not included in the assembly" and (possibly) "Index unused headers as C files."

+2
source

It actually worked for me. You have many weird makefiles throughout the project.

Project β†’ Properties β†’ C / C ++ General β†’ Path and Symbols β†’ Symbols Tab β†’ Add ...

Disable Show built-in values ​​to avoid confusion. Make sure the correct assembly configuration is set above.

Click Apply ...

You will find out that this worked if it asks you to rebuild the index.

Indigo (3.7)

+2
source

Go to "Project / Properties ..." to open the configuration for your project.

After that, go to "C / C ++ Build", then "Build Variables". Then add the variable "ABC".

+1
source

All Articles