|
|
|
Re: Unresolved inclusion: <stddef.h> [message #1710916 is a reply to message #1710905] |
Sat, 10 October 2015 20:59 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
First, you should be aware that you are dealing with two things: the IDE and a compiler. If you aren't already aware, Eclipse expects to build using make which is responsible for compilation and linking. Eclipse can generate the make file but you could instead do it yourself. Unresolved include comes from the code analysis parser which itself is only used to attempt to catch errors before an actual build. It's not really needed and other than seeing annoying messages, its output is harmless. The message is caused by Eclipse not knowing where your headers are located. This is specified on the C/C++ Project properties=>C/C++ General==>Preprocessor Include Paths, Macros, etc Entries tab. It expects directory paths and not file names. You implied you used the tab otherwise it's not at all clear what you meant by "adding a path (/usr/include/linux/stddef.h)". In fact, it's not at all clear what you have done. Whatever it means, at the very least, remove the "stddef.h" part.
See http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_general_sd_entries.htm for more information on the tab. Note the image there shows a "CDT GCC Built-in Compiler Settings ..." entry. If you don't have this entry (and it sounds like you don't) then you need to select it on the Providers tab in the same dialog. More info in this at http://help.eclipse.org/luna/topic/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_sd_providers.htm?cp=10_4_7_0_4_6_1 You will need to rebuild the index after modifying these settings.
Second, in your original post, you come across as someone who needs much more than a single, simple answer. For example, CC is a common make macro used so the compiler specification occurs in only one place. I doubt you saw CC by itself and more likely it was as $(CC) or ${CC}. My suggestion is to create an "Hello, World" project then modify it to contain your current code. Doing so will set up your project with defaults commonly needed to find things in /usr/include and other places. Alternately, since you have pre-existing code, you could select New==>Makefile Project using Existing Code instead. If you already have a make file disable generating one by deselecting Generate Makefiles automatically in C/C++ Project properties=>C/C++ Build ==> Builder Settings tab.
[Updated on: Sat, 10 October 2015 22:34] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03948 seconds