Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Header files not found: (11 Items)
   
Header files not found  
I must need lessons in using the IDE. I thought I knew how to do this, but something is not working. I have attached my 
build output.

I have a large managed make project that has a lot of symbols and include paths defined. Some of my #include lines look 
like this: #include <bits/postypes.h> (from iosfwd.h). When I try to build, I am getting an error that this header file 
is not found. I think the problem is that bits subdirectories exists in several places and, even though I have added 
proper external include paths to the project properties, the search is ending too early.

Can anybody help me with this?
Attachment: Text build_output.txt 59.38 KB
Re: Header files not found  
You need to add directory that contains bits/ not bits itself. Also if you using managed project you should edit build 
settings page -> Preprocessor

On 07/14/2011 02:36 PM, Mark Levy wrote:
> I must need lessons in using the IDE. I thought I knew how to do this, but something is not working. I have attached 
my build output.
> 
> I have a large managed make project that has a lot of symbols and include paths defined. Some of my #include lines 
look like this: #include <bits/postypes.h> (from iosfwd.h). When I try to build, I am getting an error that this header 
file is not found. I think the problem is that bits subdirectories exists in several places and, even though I have 
added proper external include paths to the project properties, the search is ending too early.
> 
> Can anybody help me with this?
> 
> 
> 
> _______________________________________________
> 
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post87351
Re: Header files not found  
On 11-07-14 02:44 PM, Elena Laskavaia wrote:
> You need to add directory that contains bits/ not bits itself. Also if
> you using managed project you should edit build settings page ->
> Preprocessor

$QNX_TARGET/usr/include/c++/4.4.2 (bits is a subdirectory of it) should 
be a default search directory when compiling with the g++ so adding the 
directories shouldn't be necessary.

Mark, can you do:

$ cat foo.cc
#include <iosfwd>
$ i486-pc-nto-qnx6.5.0-g++-4.4.2.exe foo.cc -c -v

and verify that the default directory is being added to the search path?

Regards,

Ryan Mansfield
Re: Header files not found  
Thanks, Ryan. However I am building this on Windows. (I should have specified that.) The original project was UNIX, but 
we have a different development environment. Any other suggestions?

Maybe I do not understand what a managed make project is, because I am unable to find the Preprosessor settings page. 
All I know is that this project that I inherited displays different properties pages than the projects that I have made 
myself.

I am unsing Properties -- C/C++ Include Paths and Symbols; "Add external include path" to add these paths. I have added 
both bits directories as well as the directories one level up in my paths.
Re: Header files not found  
I should add...

The line in iosfwd.h -- #include <bits/c++config.h> -- DOES work. The header file is in C:\QNX650\target\qnx6\usr\
include\c++\4.4.2\i486-pc-nto-qnx6.5.0\bits.

The other headers are located in C:\QNX650\target\qnx6\usr\include\c++\bits and are not found.
Re: Header files not found  
Ryan, I did try your suggestion and got interesting results.

The iosfwd file was located correctly, but the files it includes (stringfwd.h and posttypes.h that are in C:\QNX650\
target\qnx6\usr\include\c++\bits) were not. This sounds just like my experience within the IDE.

Do I have a bad installation?
Re: Header files not found  
Ryan,

I have now included the build output from your earlier suggestion.
Attachment: Text xxx.log 11.92 KB
Re: Header files not found  
Ryan -- one more...

We tried your suggestion on another computer (windows, also). It did not throw out the same errors as the ones we saw 
using my computer. I suspect the QNX650 installation has been compromised somehow. I am going to try to reinstall it.

Mark Levy
Re: Header files not found  
On 11-07-14 04:57 PM, Mark Levy wrote:
> Ryan -- one more...
>
> We tried your suggestion on another computer (windows, also). It did not
> throw out the same errors as the ones we saw using my computer. I
> suspect the QNX650 installation has been compromised somehow. I am going
> to try to reinstall it.

OK, it does seem like something is not the default. From the build 
output you sent, it's clearly searching " 
C:/QNX650/target/qnx6/usr/include/c++/4.4.2" containing <bits/stringfwd.h>

#include "..." search starts here:
#include <...> search starts here:
  C:/QNX650/host/win32/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/include
  C:/QNX650/target/qnx6/usr/include/c++/4.4.2
  C:/QNX650/target/qnx6/usr/include/c++/4.4.2/i486-pc-nto-qnx6.5.0
  C:/QNX650/target/qnx6/usr/include/c++/4.4.2/backward
  C:/QNX650/target/qnx6/usr/include
End of search list

Regards,

Ryan Mansfield
Re: Header files not found  
Is it possible to see where the include path is defined?
Re: Header files not found  
You do -v you can see the search path specified by the g++ driver to cc1/cc1plus as the -isystem %QNX_TARGET/usr/include
/c++/4.4.2.

Regards,

Ryan Mansfield

----- Original Message -----
From: Mark Levy [mailto:community-noreply@qnx.com]
Sent: Thursday, July 14, 2011 05:14 PM
To: momentics-community <post87362@community.qnx.com>
Subject: Re: Header files not found

Is it possible to see where the include path is defined?



_______________________________________________

QNX Momentics Community Support
http://community.qnx.com/sf/go/post87362