This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-1.1.2 HP-UX 10.x compilation question
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: egcs-1.1.2 HP-UX 10.x compilation question
- From: Vamsi Tatapudi <vamsi at synopsys dot COM>
- Date: Mon, 13 Mar 2000 00:54:36 -0800 (PST)
- Cc: vamsi at synopsys dot com (Vamsi Tatapudi)
Hi,
I have a question regarding g++-2.9.5 (egcs-1.1.2) compilation
on HP-UX 10.x platform.
Test program "test.cc"
----------------------
// Problem occurs when I include files like time.h, algo.h etc
//include <algo.h>
include <sys/time.h>
int main()
{
return (0);
}
Compilation command
-------------------
> /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/bin/g++ test.cc
Error message
-------------
In file included from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/include/sys/param.h:27,
from /usr/include/limits.h:313,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/include/limits.h:117,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/include/syslimits.h:7,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/include/limits.h:11,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/include/g++/stl_algobase.h:49,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/include/g++/algobase.h:36,
from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/include/g++/algo.h:30,
from j.cc:1:
/usr/include/sys/time.h:337: `extern' can only be specified for objects and functions
Questions
---------
- Does this indicate that the /usr/include directory
has some problems ?
- Does this indicate that the gcc installation has
some problem ?
- Is there any easy workaround ? For instance, to get rid
of the "time.h" include problem, all I had to do was make
the following link
> ln -s <gcc_include_dir>/time.h <gcc_include_dir/sys/time.h
However, this approach is not good, plus it does not work
for other files like algo.h.
I'd appreciate your help regarding this !
Thanks,
Vamsi