octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build fails: ‘strerror’ is not a member of ‘gnulib’


From: John W. Eaton
Subject: Re: build fails: ‘strerror’ is not a member of ‘gnulib’
Date: Thu, 25 Mar 2010 09:47:27 -0400

On 25-Mar-2010, David Grundberg wrote:

| John W. Eaton wrote:
| > On 24-Mar-2010, David Grundberg wrote:
| >
| > | I'm having trouble building the tip. I used to have the 'cannot open < 
| > | liboctave/mx-op-inc.mk' problem but that is fixed now, that's great, but 
| > | I'm still stuck. I removed my checkout and started anew, but it still 
| > | won't build. This is what I'm getting:
| >
| > I assume you checked in the following change to fix this problem?
| >
| > Why did you use (for example)
| >
| >   #include "stdlib.h"
| >
| > instead of
| >
| >   #include <stdlib.h>
| >
| > ?  Is this needed because some system C++ <cXXX> headers don't include
| > the corresponding C <XXX.h> header files?  If so, then maybe we should
| > be rethinking the way we use the C system headers throughout Octave.
| >   
| 
| I could have used <stdlib.h> instead of "stdlib.h", but I felt like 
| using "" because the file is in the source tree.

Yes, it may be today, but if we had a POSIX-compliant system, these
standard headers would not need to be a part of Octave.

| As for using <cstring>, this doesn't include gnulib's string.h for me.
| 
| Consider this example:
| 
| #include "config.h"
| #include <cstring>
| 
| #ifdef WORK
| // Include gnulib's string.h
| #include <string.h>
| #endif
| 
| int main ()
| {
|     gnulib::strerror (0);
|     return 0;
| }
| 
| Here it will not compile if WORK is undefined. (So this works: g++ 
| gnulibtest.cc -I. -Ilibgnu -DWORK)

What system are you using?  What version of g++?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]