This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problem with time.h
- To: gcc at gcc dot gnu dot org
- Subject: problem with time.h
- From: Steven Geerts <Steven dot geerts at alcatel dot be>
- Date: Wed, 21 Mar 2001 15:51:37 +0100
- Organization: ALCATEL
I recently installed gcc from hpux.asknet.de with swinstall
first I installed binutils version : binutils-2.10.1-sd-10.20.depot
then gcc version : gcc-2.95.2-sd-10.20.depot
then I wrote a simple test program:
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "Geef twee regels tekst: ";
string s,t;
getline(cin,s,'\n'); getline(cin,s,'\n');
cout << "Uitvoer in alfabetische volgorde:\n";
if (s < t) cout << s << endl << t <<endl;
else cout << t << endl << s <<endl;
return 0;
}
these are the errors
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
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../include/g++-3/stl_alloc.h:54,
from
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../include/g++-3/alloc.h:21,
from
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../include/g++-3/std/bastring.h:39,
from
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../../include/g++-3/string:6,
from test.c:2:
/usr/include/sys/time.h:337: `extern' can only be specified for objects
and functions
I also wrote another program, with no strings, it compiled and it work
now, what I did is, the last error line says there's a fault at line 337
with the word extern
this is what is said in the header file at line 336 -338:
# ifndef _SYS_SIGEVENT_INCLUDED
extern struct sigevent;
# endif /* _SYS_SIGEVENT_INCLUDED */
if I remove the word extern, the program works all fine.
I have'nt tested out with other progs, but maybe this is a problem you
know of, and I must do something else to fix it
tnx
--
/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-
/*- steven geerts (steven.geerts@alcatel.be) /*-
/*- junior consultant -EvoSoft - /*-
/*- I will not send lard through mail -- bart s -- /*-
/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-/*-