1832857 Members
3362 Online
110048 Solutions
New Discussion

gcc and time.h on 10.20

 
Richard Fleming
New Member

gcc and time.h on 10.20

Ok, I have binutils installed, and gcc installed. now, when I try to compile my little sample program to make sure it's working, I get this message:
# g++ test.cpp
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/3.0.1/include/st
dlib.h:239,
from /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.0.1/include/wc
har.h:22,
from /opt/gcc/include/g++-v3/bits/std_cwchar.h:42,
from /opt/gcc/include/g++-v3/bits/fpos.h:40,
from /opt/gcc/include/g++-v3/bits/std_iosfwd.h:41,
from /opt/gcc/include/g++-v3/bits/std_ios.h:39,
from /opt/gcc/include/g++-v3/bits/std_ostream.h:39,
from /opt/gcc/include/g++-v3/bits/std_iostream.h:40,
from /opt/gcc/include/g++-v3/iostream:31,
from test.cpp:1:
/usr/include/sys/time.h:337: `extern' can only be specified for objects and
functions

the test program is just a hello world program that uses #include

I've read that I'm suppose to install the PHK_8693 patch, but when I attempt to do so, I'm told that there's nothing in the depot that is compatible with my system. When I forced the patch to install anyways a TON of new errors appeared when compiling, so I removed it.

Any ideas on where to go next?
Thanks.
1 REPLY 1
Hartmut Lang
Trusted Contributor

Re: gcc and time.h on 10.20

If have no problem with gcc/g++ and time.h on my 10.20 system. But i'm using gcc version 2.95.2.

what /usr/include/sys/time.h
says
time.h $Date: 96/10/04 16:08:46 $ $Revision: 1.28.98.11 $ PATCH_10.20 (PHKL_8693)

I think you need the patch PHKL_8693. This is a Series 700 patch. There are equivalent patches for Series 800 (PHKL_8692), maybe you need this one.

Hardy