This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: code broken by gcc 3.0
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: code broken by gcc 3.0
- From: Brent Phillips <brent at lyrastudios dot com>
- Date: Thu, 16 Aug 2001 22:03:41 -0700
- Cc: gcc-help at gcc dot gnu dot org
- References: <Brent Phillips's message of "Wed, 15 Aug 2001 23:41:29 -0700"><5.1.0.14.2.20010815234027.03b96d60@lyrastudios.com>
Hi,
Looking in stdlib.h, I find:
/* Execute the given line as a shell command. */
extern int system (__const char *__command) __THROW;
Experimenting with a test program, I found that this error always occurs
unless <stdlib.h> and <unistd.h> are both included before <vector>.
HOWEVER...my app still won't compile, even after adding <stdlib.h> and
<unistd.h> before <vector>. What's going on here?
Sincerely,
Brent
At 10:15 PM 8/16/2001 -0300, Alexandre Oliva wrote:
>On Aug 16, 2001, Brent Phillips <brent@lyrastudios.com> wrote:
>
> > /usr/include/g++-v3/bits/std_cstdlib.h: At global scope:
> > /usr/include/g++-v3/bits/std_cstdlib.h:103: `system' not declared
>
>It looks like a declaration for function system() is missing in the
>standard header files of whatever OS you're running, and such a
>declaration appears to be necessary for std_cstdlib.h to compile
>properly. We have to either fixinc stdlib.h or introduce a configure
>test in libstdc++-v3 that detects whether there is a declaration of
>::system() in stdlib.h.
>
>--
>Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
>Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
>CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
>Free Software Evangelist *Please* write to mailing lists, not to me