This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compliation error after installing gcc-2.95.2
>On Mar 2, 2000, liuzr@uiuc.edu wrote:
>
>> from foo.C:13:
>
>Was the error message truncated in your message only, or does GCC
>really print just that?
>
>--
>Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Enjoy Guaranį
>Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
>Free Software Developer and Evangelist CS PhD student at IC-Unicamp
>oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
Yes, that's all the error message. Here is again an exact copy of the error I got with a test program:
*************
337 % g++ test.C
In file included from /usr/include/sys/resource.h:21,
from /usr/include/sys/wait.h:83,
from /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/include/stdlib.h:231,
from test.C:2:
/usr/include/sys/time.h:337: `extern' can only be specified for objects and functions
338 %
*************
Here is the "test.C":
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <math.h>
#include <string.h>
void main ()
{
}
Again, the machine is HP 9000/770, running HPUX 10.20. I was using gcc 2.8.1 before and it worked fine with the same program.
Actually if I don't have the #include <stdlib.h>, some programs will compile fine. Then some programs that use function "atof" will complain.
Looks like some incompatibility between g++'s stdlib.h and the system's 'time.h'? Or I did something wrong?
--
-Alan