Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » help: invalid include path
help: invalid include path [message #165950] Thu, 16 March 2006 12:24 Go to next message
shai is currently offline shai
Messages: 3
Registered: July 2009
Junior Member
Hi,

when i add an include path to my project it add the Debug directory to the
path
and i get an invalid path.

for example, my project name is "STB" and it located at "c:\workspace\STB".
i have added the path "driver/include". on my project space under the
include
folder i see the following path: "STB/Debug/driver/include".

i have no clue y this happens and i cant compile my prohect since it doesnt
find my include files...

please check this out.

thanks alot,
shai
Re: help: invalid include path [message #165978 is a reply to message #165950] Fri, 17 March 2006 02:43 Go to previous messageGo to next message
Eclipse User
Originally posted by: sscout.gmpexpress.net

shai wrote:
> Hi,
>
> when i add an include path to my project it add the Debug directory to
> the path
> and i get an invalid path.
>
> for example, my project name is "STB" and it located at "c:\workspace\STB".
> i have added the path "driver/include". on my project space under the
> include
> folder i see the following path: "STB/Debug/driver/include".
>
> i have no clue y this happens and i cant compile my prohect since it doesnt
> find my include files...
>
> please check this out.
>
> thanks alot,
> shai
>
>

You need to understand that in managed make projects, the system include
paths are all automatically added for you - whether CDT uses absolute or
relative path names, it always does this right. As a consequence, CDT
can set the build system's working directory to wherever it wishes - and
in this case, it has set the working directory to be the Debug
directory. All relative path names are interpreted from the working
directory. I say you need to understand this because it will affect ANY
relative path you enter, not just for include path resolution.
Hopefully you'll have a better idea what to look for if something
similar happens in the future.

To resolve the path name properly, change the local include path like so:

"driver/include"

becomes

"../driver/include"

Alternatively, you could use an absolute path name, but that makes it
much easier for someone to break your makefiles if you re-distribute
your program in source code form - if they put the source in a different
folder, the absolute path to your project (and thus your include
directory) will not be what the makefile expects.

Shawn
Re: help: invalid include path [message #166077 is a reply to message #165978] Sun, 19 March 2006 07:30 Go to previous message
shai is currently offline shai
Messages: 3
Registered: July 2009
Junior Member
Thanks alot Shawn !

you have solved this problem for me.

i did this and now the path is correct but still some folders dont have a
"+"
sign next to them and it looks like they have no files inside and i dont
get
the h files i need. some folders work fine.

any idea ?
Previous Topic:Creating project that can be used in Window and Linux environment
Next Topic:Working Set
Goto Forum:
  


Current Time: Sun Oct 26 04:44:15 GMT 2014

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

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