Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved symbols while including C++ version of C header
icon5.gif  Unresolved symbols while including C++ version of C header [message #1436898] Fri, 03 October 2014 15:26 Go to next message
Ariel Lucki is currently offline Ariel LuckiFriend
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!
Re: Unresolved symbols while including C++ version of C header [message #1437014 is a reply to message #1436898] Fri, 03 October 2014 19:34 Go to previous message
Ariel Lucki is currently offline Ariel LuckiFriend
Messages: 2
Registered: October 2014
Junior Member
I didn't realize I was doing the inclusion in the wrong place, I moved the include's from the .h to the .cpp, and everything is working now (or seems to work, because now it doesn't compile but I believe it's for a different reason altogether).

My mistake, sorry guys. Thanks again!
Previous Topic:No Run button
Next Topic:How to deactivate automatic (while typing) code folding?
Goto Forum:
  


Current Time: Sun Oct 06 17:03:35 GMT 2024

Powered by FUDForum. Page generated in 0.03438 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top