|
Boost : |
From: Rob Lievaart (Rob.Lievaart_at_[hidden])
Date: 2004-03-24 04:40:32
Hi,
I just downloaded and compiled the version 262 of the
library using Mingw (gcc 3.2.3) and I ran into a problem
compiling parser.cpp:
The function parse_environment contains the following lines:
#if defined(_WIN32)
char **environ = _environ;
#endif
But the mingw provided stdlib.h contains an unconditional
#define environ _environ
So it does not compile :-(
I changed parser.cpp to
#if defined(_WIN32) && !defined( __MINGW32__ )
char **environ = _environ;
#endif
And now it compiles and the samples run, but I have not
actually tried to use enviroment variables.
Also I checked the stdlib.h provided with MSVC6.5 and
that contains
#ifdef _POSIX_
extern char ** environ; /* pointer to environment table */
#else
But I guess this would not cause a problem when _POSIX_ is defined,
because the local environ would just hide the one from stdlib.h.
And a small question, is the library supposed to work with 6.5 at all?
I get a rather large amount of errors and warnings when I try to build
it. I haven't looked into them yet, if it is not supposed to work then I
won't spend any time on it.
Rob Lievaart
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk