Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - compilation error with unistd.h: (3 Items)
   
compilation error with unistd.h  
Hi,

I got the following error information when I tried to compile a program.

"/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error _POSIX_VERSION not configured for system"

I searched related issues and found there was one talking about this problem. The link is http://community.qnx.com/sf/
discussion/do/listPosts/projects.pkgsrc/discussion.general.topc1736?_pagenum=2

It said the problem was fixed in the latest unistd.h. I am using qnx6.3.2 and I am not very sure how I can get rid of 
the error. Should I download a latest unistd.h and replaced the previous one? 

Thanks. 
Re: compilation error with unistd.h  
On Tue, Sep 14, 2010 at 03:09:50PM -0400, Yuan Sun wrote:
> Hi,
> 
> I got the following error information when I tried to compile a program.
> 
> "/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error _POSIX_VERSION not configured for system"
> 
> I searched related issues and found there was one talking about this problem. The link is http://community.qnx.com/sf/
discussion/do/listPosts/projects.pkgsrc/discussion.general.topc1736?_pagenum=2
> 
> It said the problem was fixed in the latest unistd.h. I am using qnx6.3.2 and I am not very sure how I can get rid of 
the error. Should I download a latest unistd.h and replaced the previous one? 

You'll have a much better pkgsrc experience on 6.5.

Regards,

-seanb
Re: compilation error with unistd.h  
Yes. I experienced 6.4.1 and found it much better than 6.3.2. Unluckily, due
to another library we wanted to use on the system, which just supported
qnx6.3, I had to switch back to 6.3.2.

According to the previous post, can I just delete the two lines with - to
get rid of the problem?

#define _POSIX_VERSION		199009L
 #elif defined(__EXT_POSIX1_198808)
 #define _POSIX_VERSION		198808L
-#else
-#error _POSIX_VERSION not configured for system
 #endif
 #endif



On Tue, Sep 14, 2010 at 3:28 PM, Sean Boudreau <community-noreply@qnx.com>wrote:

> On Tue, Sep 14, 2010 at 03:09:50PM -0400, Yuan Sun wrote:
> > Hi,
> >
> > I got the following error information when I tried to compile a program.
> >
> > "/usr/qnx632/target/qnx6/usr/include/unistd.h:135:2: #error
> _POSIX_VERSION not configured for system"
> >
> > I searched related issues and found there was one talking about this
> problem. The link is
> http://community.qnx.com/sf/discussion/do/listPosts/projects.pkgsrc/discussion.general.topc1736?_pagenum=2
> >
> > It said the problem was fixed in the latest unistd.h. I am using qnx6.3.2
> and I am not very sure how I can get rid of the error. Should I download a
> latest unistd.h and replaced the previous one?
>
> You'll have a much better pkgsrc experience on 6.5.
>
> Regards,
>
> -seanb
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post67246
>
>


-- 
Yuan (Amy) Sun
Visiting PhD Student

Robotics Institute
School of Computer Science
Carnegie Mellon University
5000 Forbes Ave
Pittsburgh, PA 15213 USA