Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't include headers in additional include paths(Not able to set additional include paths properly for my project)
Can't include headers in additional include paths [message #804318] Wed, 22 February 2012 08:26 Go to next message
Eclipse UserFriend
I'm using eclipse Indigo for windows on windows 7 32-bit and a toolchain based on ARM cross compile toolchain which has the version of glibc-2.9 gcc-4.3.4. My project is currently in C but I'm willing to change it to C++ anytime if necessary; its configurations you might want to know are as follows.

In "C/C++ build->settings" section in project properties I gave the path "/cygdrive/c/glibc-oabi-toolchain-arm-generic/bin/arm-unknown-linux-gnu-gcc" for "GCC C Compiler" and "GCC C Linker" and "GCC Assembler" in their command boxes and set some miscellaneous parameters for compiler and linker. Then in the "C/C++ build->Tool Chain Editor" section the "Current builder" is set to "Gnu Make Builder" and the "Current toolchain" is set to "Linux GCC".

Now the issue is I don't seem to be able to set additional include paths properly since although I've added a path like "c:\sdk\include" to "C/C++ build->settings->GCC C Compiler->Includes" section and this path is also automatically added to "C/C++ General->Paths and Symbols->Includes" section and there's a header like "stdio.h" in that path I encounter the following error

unresolved inclusion:<stdio.h>


for following line of code

#include <stdio.h>;


Finally if it might be of any help the miscellaneous parameters I set for compiler are:
"-Wundef -Wstrict-prototypes -Werror-implicit-function-declaration -Wdeclaration-after-statement -fsigned-char -marm -mapcs -march=armv5te -mtune=arm9tdmi -mno-sched-prolog -mabi=apcs-gnu -mlittle-endian -mno-thumb-interwork -msoft-float -c"

And miscellaneous parameter set for linker are:
"-marm -mapcs -march=armv5te -mtune=arm9tdmi -mno-sched-prolog -mabi=apcs-gnu -mlittle-endian -mno-thumb-interwork -msoft-float -Wl,-Map,"${PWD}/${ProjName}.map"


Any advise on what might be the cause of problem is appreciated, thanks.
Re: Can't include headers in additional include paths [message #822320 is a reply to message #804318] Fri, 16 March 2012 09:15 Go to previous messageGo to next message
Eclipse UserFriend
I would not hold my breath waiting for an answer to this question or a solution to your problem. I have the exact situation you have only with a different cross compiler and I am running in to the same issue. The problem is that Eclipse for Windows only understands Windows/DOS paths and those paths are what is uses for things like auto-complete and those pesky warnings/errors it displays in the IDE. On the flip side, the build process uses Cygwin which only understands Unix paths and those are used by things like make and gcc. I do not understand how this is not an issue for enough people that it is fixed, but maybe there are not enough people that use Eclipse under Windows.

The only answer I have been able to come up with is as long as it builds, go with it. You simply have to deal with the fact that auto-completion/hints do not work for some things and the meaningless warnings/errors that show up on both sides of the editor.

One thing I have been playing with that seems to fix some of this is symbolic links. Windows Vista/7 has a utility called "mklink" that allows creation of symbolic links. It is not perfect, but it seems to be working.
Re: Can't include headers in additional include paths [message #825868 is a reply to message #804318] Wed, 21 March 2012 07:02 Go to previous messageGo to next message
Eclipse UserFriend
The error message about unresolved inclusion comes from the internal indexer. On one side you are using an arm cross compiler under Cygwin for the build but then the you set the toolchain to "Linux GCC" in C/C++ build->Tool Chain Editor. So Eclipse will look for the Linux gcc compiler and tries to find the includes. You should set the toolchain to Cygwin gcc and in C/C++ build->Discovery options you should adapt the compiler invocation command to "arm-unknown-linux-gnu-gcc".
Re: Can't include headers in additional include paths [message #1743670 is a reply to message #825868] Sun, 18 September 2016 13:42 Go to previous message
Eclipse UserFriend
same problem. any solution?
Previous Topic:Eclipse Neon not working
Next Topic:Implicit int to enum
Goto Forum:
  


Current Time: Thu Jul 24 13:25:16 EDT 2025

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

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

Back to the top