Hi
Assume the following c files:
main.c:
#include "hdr1.h"
void main(void)
{
fun();
}
hdr1.h:
imp1.c:
#include "hdr1.h"
void fun(void) {}
hdr2.h:
imp2.c:
#include "hdr2.h"
void fun(void) {}
Makefile:
all: main.c imp1.c imp2.c
gcc -c *.c
gcc main.c imp1.c !!! imp2.c not used !!!
clean:
rm *.o a.out
When I use "Open Declaration" on fun() in main.c eclipse shows 2 candidates:
1. fun() from imp1.c
2. fun() from imp2.c
How can I force eclipse to jump directly to fun() from imp1.c.
I'm not interested in the solution when I have to manually exclude any files from indexing.
It is because I want to use Eclipse for a large C project.
I dont know the relations between specific object files, headers and modules in this project.
I suppose that there must be an option to build the index when the project is build. It is utilizing the compiler to generate index.
Is there such an option ?
thanks for help