This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: code broken by gcc 3.0


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]