Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - #include paths: (4 Items)
   
#include paths  
I am having a problem where header files are be included from too many different directories. What are the default paths
 for #include "" and #include <>? 
Re: #include paths  
I beilieve I have seen that adding "extra include paths" does not affect the #include<> form. Anybod care to comment on 
that?
Re: #include paths  
I'm new to momentics, but I got mine working either with either the full path in "" or adding the include base path in 
the project properties and using <> with the rest of the path

ex
extra include path [path to stage]/stage/usr/include
#include <sys/csm.h>

since csm.h is in stage/usr/include/sys

Hope that helps.
Re: #include paths  
In case mentioned below, correct form is:

#include "sys/csm.h"

OR

#include <sys/csm.h>

BUT NOT

#include "full/path/to/csm.h"


When you use "" gcc first looks at the directory where current file 
(containing the inclue directive) is, so quoted form would be 
appropriate for another header living in 'sys', and less correct, but 
with little practical difference, would be using quoted include in your 
.c file).

Stage headers:
If your header is in stage/usr/include, then this is added automatically 
providing you correctly setup your environment. Observing compilation 
line would reveal whether your stage/usr/include is added as one of 
-I.... options.

Further, in case of stage, you do not need to use EXTRA_INCVPATH as it 
should get added automatically.


---
Aleksandar


On 12-04-26 09:27 AM, Brandon Doherty wrote:
> I'm new to momentics, but I got mine working either with either the full path in "" or adding the include base path in
 the project properties and using<>  with the rest of the path
>
> ex
> extra include path [path to stage]/stage/usr/include
> #include<sys/csm.h>
>
> since csm.h is in stage/usr/include/sys
>
> Hope that helps.
>
>
>
> _______________________________________________
>
> QNX Momentics Getting Started
> http://community.qnx.com/sf/go/post92744
>