Unresolved symbols while including C++ version of C header [message #1436898] |
Fri, 03 October 2014 15:26 |
Ariel Lucki Messages: 2 Registered: October 2014 |
Junior Member |
|
|
I'm facing a strange issue with Eclipse Luna (4.4.0) CDT under Linux. I have a C/C++ project using a Makefile (GNU Toolchain, g++ compiler).
The project builds correctly (either from Eclipse or from the command line with "make"), however the Eclipse Editor shows "Symbol 'XXX' could not be resolved" on some macros and variables if I include the C++ version of C headers.
To be more specific, for example, I'm including "#include <csignal>", and Eclipse fails to resolve symbols like "SA_SIGINFO" or the member "sa_sigaction" from the "sigaction" structure. If I Ctrl+Right Click, it takes me to the correct definition, but it won't recognize the them in the editor. If I switch from "#include <csignal>" to "#include <signal.h>" it works correctly at build and from the Eclipse Editor. However, this shouldn't be an issue because "csignal" includes both "bits/c++config.h" AND "signal.h", but Eclipse can't seem to notice.
I've already tried closing and reopening the project, rebuilding the index and building the project both from Eclipse and by the command line. Everything works flawlessly except I get the error in the Eclipse Editor and, of course, autocomplete is broken.
Is this a bug on the Scanner Discovery or am I missing some obscure configuration detail? I don't want to disable this type of warning from the Editor but I can't figure out why Eclipse is behaving this way.
Thanks in advance!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03438 seconds