Community
Participate
Working Groups
Build Identifier: 20090920-1017 I have a project with own include tree: include\versionA\foo.h, include\versionB\foo.h and two versions of foo.h files. In these files struct foobar {} is defined. In my executable I use versionA but in library I use versionB. This is imported makefile project. When I browse code in executable, by pressing F3 I jump to foobar definition in versionB headers which is wrong. The headers are specified correctly in per-target CFLAGS with -I options so there is no problem during compilation but only during code browsing. Reproducible: Always Steps to Reproduce: 1.Create automake/autoconf project 2.Create header files with the same names under inlcude dir ./include/A/foo.h , ./include/B/foo.h with same named structs defined. 3.add only one header dir to the search path when compiling the executable. 4.Import makefile based project to eclipse together with ./include/* 5.Eclipse code browser is confused and can drop you to the wrong header when you go to declaration/definition
This behaviour was caused by using #define FOO_H at the beginning of header file. Versions A and B were using same symbol FOO_H to check if the header file was already included. After changing the names of these symbols defined at the beginning of the header files to different, the code browse (search for definitions) works well.