public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compliation error after installing gcc-2.95.2
@ 2000-03-02 15:21 liuzr
  2000-03-02 23:12 ` Alexandre Oliva
  2000-04-01  0:00 ` liuzr
  0 siblings, 2 replies; 12+ messages in thread
From: liuzr @ 2000-03-02 15:21 UTC (permalink / raw)
  To: gcc-help

After upgrade to gcc 2.95.2, I got the following error
when compling my c++ programs:

514% gcc foo.C
g++ -fpermissive foo.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 foo.C:13:

This happens for all programs.  Any help is greatly appreciated!

platform: HP 9000/770, HPUX 10.20

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-02 15:21 compliation error after installing gcc-2.95.2 liuzr
@ 2000-03-02 23:12 ` Alexandre Oliva
  2000-03-03  6:54   ` Alan Z. Liu
  2000-04-01  0:00   ` Alexandre Oliva
  2000-04-01  0:00 ` liuzr
  1 sibling, 2 replies; 12+ messages in thread
From: Alexandre Oliva @ 2000-03-02 23:12 UTC (permalink / raw)
  To: liuzr; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-02 23:12 ` Alexandre Oliva
@ 2000-03-03  6:54   ` Alan Z. Liu
  2000-03-03 12:19     ` Alexandre Oliva
  2000-04-01  0:00     ` Alan Z. Liu
  2000-04-01  0:00   ` Alexandre Oliva
  1 sibling, 2 replies; 12+ messages in thread
From: Alan Z. Liu @ 2000-03-03  6:54 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

>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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03  6:54   ` Alan Z. Liu
@ 2000-03-03 12:19     ` Alexandre Oliva
  2000-03-03 12:39       ` Alan Z. Liu
  2000-04-01  0:00       ` Alexandre Oliva
  2000-04-01  0:00     ` Alan Z. Liu
  1 sibling, 2 replies; 12+ messages in thread
From: Alexandre Oliva @ 2000-03-03 12:19 UTC (permalink / raw)
  To: Alan Z. Liu; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:

> Yes, that's all the error message.  Here is again an exact copy of the error I got with a test program:

> /usr/include/sys/time.h:337: `extern' can only be specified for objects and functions

This line was missing in the previous post.

> 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'?

Could be, if g++ had its own stdlib.h :-)

All it has is a fixed version of HP-UX's stdlib.h.  Could it be that
something went wrong while fixinc was running, during the build
process?  Could you please post the preprocessed version of your code
snippet, for us to try to figure out what's going wrong with it?
See http://www.gnu.org/software/gcc/bugs.html

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03 12:19     ` Alexandre Oliva
@ 2000-03-03 12:39       ` Alan Z. Liu
  2000-03-03 16:37         ` Alexandre Oliva
  2000-04-01  0:00         ` Alan Z. Liu
  2000-04-01  0:00       ` Alexandre Oliva
  1 sibling, 2 replies; 12+ messages in thread
From: Alan Z. Liu @ 2000-03-03 12:39 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4296 bytes --]

>On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:
>
>> Yes, that's all the error message.  Here is again an exact copy of the error I got with a test program:
>
>> /usr/include/sys/time.h:337: `extern' can only be specified for objects and functions
>
>This line was missing in the previous post.

sorry about the missing line.

> > 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'?
>
>Could be, if g++ had its own stdlib.h :-)
>All it has is a fixed version of HP-UX's stdlib.h.  Could it be that
>something went wrong while fixinc was running, during the build
>process?  Could you please post the preprocessed version of your code
>snippet, for us to try to figure out what's going wrong with it?
>See http://www.gnu.org/software/gcc/bugs.html
>
>--
>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

I didn't build the gcc binary.  It is installed as a HP depot file which I downloaded from the Wiscosine site.

On the other hand, I did try to build from the source code.  Here is what I did:
get the source code, untared, into /lidar/sw/gcc-2.95.2/
mkdir /lidar/sw/gcc
cd /lidar/sw/gcc
setenv CC cc
./configure
This seems to be completed fine.
./make
After a long compilations, it failed with the following message:
-------------------------------------
make[2]: Entering directory `/lidar/sw/gcc/gcc/f'
cc -c  -DIN_GCC    -g  -W -Wall    -I. -I.. -I../../../gcc-2.95.2/gcc/f -I../../../gcc-2.95.2/gcc/f/.. -I../../../gcc-2.
95.2/gcc/f/../config -I../../../gcc-2.95.2/gcc/f/../../include ../../../gcc-2.95.2/gcc/f/bad.c
cc: warning 422: Unknown option "-W-Wall" ignored.
cpp: "proj.h", line 35: error 4052: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "global.h", line 161: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "global.h", line 161: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
make[2]: *** [bad.o] Error 1
make[2]: Leaving directory `/lidar/sw/gcc/gcc/f'
make[1]: *** [f771] Error 2
make[1]: Leaving directory `/lidar/sw/gcc/gcc'
make: *** [all-gcc] Error 2
-------------------------------------

I did install the binutilis before build gcc, and a 'which as' gives
/opt/binutils/bin/as
I figure this might be the problem as I read through other postings.

Thanks very much for your time!


--

-Alan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03 12:39       ` Alan Z. Liu
@ 2000-03-03 16:37         ` Alexandre Oliva
  2000-04-01  0:00           ` Alexandre Oliva
  2000-04-01  0:00         ` Alan Z. Liu
  1 sibling, 1 reply; 12+ messages in thread
From: Alexandre Oliva @ 2000-03-03 16:37 UTC (permalink / raw)
  To: Alan Z. Liu; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:

> ./configure
> This seems to be completed fine.
> ./make
> After a long compilations, it failed with the following message:

Yep.  According to the installation instructions, you should have
written `make bootstrap' instead.

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03 16:37         ` Alexandre Oliva
@ 2000-04-01  0:00           ` Alexandre Oliva
  0 siblings, 0 replies; 12+ messages in thread
From: Alexandre Oliva @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Alan Z. Liu; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:

> ./configure
> This seems to be completed fine.
> ./make
> After a long compilations, it failed with the following message:

Yep.  According to the installation instructions, you should have
written `make bootstrap' instead.

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* compliation error after installing gcc-2.95.2
  2000-03-02 15:21 compliation error after installing gcc-2.95.2 liuzr
  2000-03-02 23:12 ` Alexandre Oliva
@ 2000-04-01  0:00 ` liuzr
  1 sibling, 0 replies; 12+ messages in thread
From: liuzr @ 2000-04-01  0:00 UTC (permalink / raw)
  To: gcc-help

After upgrade to gcc 2.95.2, I got the following error
when compling my c++ programs:

514% gcc foo.C
g++ -fpermissive foo.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 foo.C:13:

This happens for all programs.  Any help is greatly appreciated!

platform: HP 9000/770, HPUX 10.20

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03 12:19     ` Alexandre Oliva
  2000-03-03 12:39       ` Alan Z. Liu
@ 2000-04-01  0:00       ` Alexandre Oliva
  1 sibling, 0 replies; 12+ messages in thread
From: Alexandre Oliva @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Alan Z. Liu; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:

> Yes, that's all the error message.  Here is again an exact copy of the error I got with a test program:

> /usr/include/sys/time.h:337: `extern' can only be specified for objects and functions

This line was missing in the previous post.

> 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'?

Could be, if g++ had its own stdlib.h :-)

All it has is a fixed version of HP-UX's stdlib.h.  Could it be that
something went wrong while fixinc was running, during the build
process?  Could you please post the preprocessed version of your code
snippet, for us to try to figure out what's going wrong with it?
See http://www.gnu.org/software/gcc/bugs.html

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03 12:39       ` Alan Z. Liu
  2000-03-03 16:37         ` Alexandre Oliva
@ 2000-04-01  0:00         ` Alan Z. Liu
  1 sibling, 0 replies; 12+ messages in thread
From: Alan Z. Liu @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4296 bytes --]

>On Mar  3, 2000, "Alan Z. Liu" <liuzr@uiuc.edu> wrote:
>
>> Yes, that's all the error message.  Here is again an exact copy of the error I got with a test program:
>
>> /usr/include/sys/time.h:337: `extern' can only be specified for objects and functions
>
>This line was missing in the previous post.

sorry about the missing line.

> > 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'?
>
>Could be, if g++ had its own stdlib.h :-)
>All it has is a fixed version of HP-UX's stdlib.h.  Could it be that
>something went wrong while fixinc was running, during the build
>process?  Could you please post the preprocessed version of your code
>snippet, for us to try to figure out what's going wrong with it?
>See http://www.gnu.org/software/gcc/bugs.html
>
>--
>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

I didn't build the gcc binary.  It is installed as a HP depot file which I downloaded from the Wiscosine site.

On the other hand, I did try to build from the source code.  Here is what I did:
get the source code, untared, into /lidar/sw/gcc-2.95.2/
mkdir /lidar/sw/gcc
cd /lidar/sw/gcc
setenv CC cc
./configure
This seems to be completed fine.
./make
After a long compilations, it failed with the following message:
-------------------------------------
make[2]: Entering directory `/lidar/sw/gcc/gcc/f'
cc -c  -DIN_GCC    -g  -W -Wall    -I. -I.. -I../../../gcc-2.95.2/gcc/f -I../../../gcc-2.95.2/gcc/f/.. -I../../../gcc-2.
95.2/gcc/f/../config -I../../../gcc-2.95.2/gcc/f/../../include ../../../gcc-2.95.2/gcc/f/bad.c
cc: warning 422: Unknown option "-W-Wall" ignored.
cpp: "proj.h", line 35: error 4052: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 137: warning 2013: Unknown preprocessing directive.
cpp: "com.h", line 145: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "global.h", line 161: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "global.h", line 161: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "target.h", line 48: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 132: warning 2013: Unknown preprocessing directive.
cpp: "bld.h", line 763: warning 2013: Unknown preprocessing directive.
make[2]: *** [bad.o] Error 1
make[2]: Leaving directory `/lidar/sw/gcc/gcc/f'
make[1]: *** [f771] Error 2
make[1]: Leaving directory `/lidar/sw/gcc/gcc'
make: *** [all-gcc] Error 2
-------------------------------------

I did install the binutilis before build gcc, and a 'which as' gives
/opt/binutils/bin/as
I figure this might be the problem as I read through other postings.

Thanks very much for your time!


--

-Alan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-02 23:12 ` Alexandre Oliva
  2000-03-03  6:54   ` Alan Z. Liu
@ 2000-04-01  0:00   ` Alexandre Oliva
  1 sibling, 0 replies; 12+ messages in thread
From: Alexandre Oliva @ 2000-04-01  0:00 UTC (permalink / raw)
  To: liuzr; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: compliation error after installing gcc-2.95.2
  2000-03-03  6:54   ` Alan Z. Liu
  2000-03-03 12:19     ` Alexandre Oliva
@ 2000-04-01  0:00     ` Alan Z. Liu
  1 sibling, 0 replies; 12+ messages in thread
From: Alan Z. Liu @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

>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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-02 15:21 compliation error after installing gcc-2.95.2 liuzr
2000-03-02 23:12 ` Alexandre Oliva
2000-03-03  6:54   ` Alan Z. Liu
2000-03-03 12:19     ` Alexandre Oliva
2000-03-03 12:39       ` Alan Z. Liu
2000-03-03 16:37         ` Alexandre Oliva
2000-04-01  0:00           ` Alexandre Oliva
2000-04-01  0:00         ` Alan Z. Liu
2000-04-01  0:00       ` Alexandre Oliva
2000-04-01  0:00     ` Alan Z. Liu
2000-04-01  0:00   ` Alexandre Oliva
2000-04-01  0:00 ` liuzr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).