aCC compiler error with namespace
Adam Fanello <[email protected]> Thu, 22 Aug 2002 11:34:50 -0700
| Newsgroups | gmane.comp.gcc.cgicc.bugs |
|---|---|
| Message-ID | <012D0E417390D411ABD400A0C9175D8050D0AF@MAIL> |
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C24A0A.994CF0C0
Content-Type: text/plain;
charset="iso-8859-1"
Incompatiblity with HP's aCC version B3910B A.03.33.
Error message, system information, and solution below:
--------------------------------------------------
The HP-UX aCC compiler complains:
/bin/sh ../libtool --mode=compile aCC -DHAVE_CONFIG_H -I. -I. -I. -I.. -I..
-g -c MStreamable.cpp
rm -f .libs/MStreamable.lo
aCC -DHAVE_CONFIG_H -I. -I. -I. -I.. -I.. -g -c MStreamable.cpp +Z -DPIC -o
.libs/MStreamable.lo
Error (future) 600: "MStreamable.cpp", line 32 # Type specifier is omitted;
"int" is no longer assumed.
const MStreamable& obj)
^^^^^
Error 22: "MStreamable.cpp", line 32 # Syntax error.
const MStreamable& obj)
^
Error 711: "MStreamable.cpp", line 31 # There is no matching declaration for
'std::basic_ostream<char,std::char_traits<char> > &<<()' in namespace
"namespace cgicc".
CGICCNS operator<<(STDNS ostream& out,
^^^^^^^^^^^^^^^^^^
Error 172: "MStreamable.cpp", line 34 # Undeclared variable 'obj'.
obj.render(out);
^^^
Warning: 1 future errors were detected and ignored. Add a '+p' option
to detect and fix them before they become fatal errors in a future release.
Behavior of this ill-formed program is not guaranteed to match that of a
well-formed program
make[1]: *** [MStreamable.lo] Error 1
--------------------------------------
Solution:
Add the CGICCNS in front of the parameter that it is complaining about:
STDNS ostream&
CGICCNS operator<<(STDNS ostream& out,
const CGICCNS MStreamable& obj)
^^^^^^^
added this
--------------------------------------
support/config.guess output:
hppa2.0w-hp-hpux11.11
uname -a
HP-UX rp2430 B.11.11 U 9000/800 897819656 unlimited-user license
-------------------------------------
configure output:
loading cache ./config.cache
checking for a BSD compatible install... support/install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking for c++... (cached) aCC
checking whether the C++ compiler (aCC ) works... yes
checking whether the C++ compiler (aCC ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) no
checking whether aCC accepts -g... (cached) yes
checking for a BSD compatible install... support/install-sh -c
checking host system type... hppa2.0w-hp-hpux11.11
checking build system type... hppa2.0w-hp-hpux11.11
checking for ranlib... (cached) ranlib
checking for gcc... (cached) aCC
checking whether the C compiler (aCC ) works... yes
checking whether the C compiler (aCC ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether aCC accepts -g... (cached) yes
checking for non-GNU ld... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) no
checking for BSD-compatible nm... (cached) /usr/bin/nm -p
checking whether ln -s works... (cached) yes
checking whether we are using GNU C... no
checking for object suffix... o
checking for executable suffix... no
checking for aCC option to produce PIC... +Z
checking if aCC PIC flag +Z works... yes
checking if aCC supports -c -o file.o... yes
checking if aCC supports -c -o file.lo... yes
checking if aCC static flag -Wl,-a -Wl,archive works... -Wl,-a -Wl,archive
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -p output... failed
checking how to hardcode library paths into programs... relink
checking for /usr/bin/ld option to reload object files... -r
checking dynamic linker characteristics... hpux11.11 dld.sl
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
loading cache ./config.cache
checking for gethostbyaddr in -lnsl... (cached) yes
checking whether to link against libstdc++... (cached) yes
checking how to run the C++ preprocessor... (cached) aCC -E
checking for sys/time.h... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking host system type... hppa2.0w-hp-hpux11.11
checking whether the C++ compiler (aCC) supports STL... (cached) yes
checking whether the C++ compiler (aCC) supports namespaces... (cached) yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for strftime... (cached) yes
checking for gettimeofday... (cached) yes
checking for uname... (cached) yes
checking whether to use gcc verbose warnings... yes
checking whether to use the cgicc namespace... yes
checking whether to enable debug logging... no
checking whether to build the cgicc demos... yes
creating ./config.status
creating Makefile
creating cgicc/Makefile
creating cgicc/CgiDefs.h
creating info/Makefile
creating demo/Makefile
creating support/Makefile
creating support/cgicc-config
creating cgicc/config.h
cgicc/config.h is unchanged
------------
I'm using cgicc-3.1.5. Old, but I checked CVS and see that only the comments
in this file have ever changed.
Adam Fanello
Sr. Software Engineer
Centor Software
------_=_NextPart_001_01C24A0A.994CF0C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>aCC compiler error with namespace</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Incompatiblity with HP's aCC version B3910B =
A.03.33.</FONT>
</P>
<P><FONT SIZE=3D2>Error message, system information, and solution =
below:</FONT>
</P>
<P><FONT =
SIZE=3D2>--------------------------------------------------</FONT>
</P>
<P><FONT SIZE=3D2>The HP-UX aCC compiler complains:</FONT>
</P>
<P><FONT SIZE=3D2>/bin/sh ../libtool --mode=3Dcompile aCC =
-DHAVE_CONFIG_H -I. -I. -I. -I.. -I.. -g -c =
MStreamable.cpp</FONT>
<BR><FONT SIZE=3D2>rm -f .libs/MStreamable.lo</FONT>
<BR><FONT SIZE=3D2>aCC -DHAVE_CONFIG_H -I. -I. -I. -I.. -I.. -g -c =
MStreamable.cpp +Z -DPIC -o .libs/MStreamable.lo</FONT>
<BR><FONT SIZE=3D2>Error (future) 600: "MStreamable.cpp", =
line 32 # Type specifier is omitted;</FONT>
<BR><FONT SIZE=3D2> "int" is no longer =
assumed.</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
const MStreamable& obj)</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
^^^^^ &=
nbsp; </FONT>
<BR><FONT SIZE=3D2>Error 22: "MStreamable.cpp", line 32 # =
Syntax error.</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
const MStreamable& obj)</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; &nb=
sp; &nb=
sp; ^ </FONT>
<BR><FONT SIZE=3D2>Error 711: "MStreamable.cpp", line 31 # =
There is no matching declaration for</FONT>
<BR><FONT SIZE=3D2> =
'std::basic_ostream<char,std::char_traits<char> > =
&<<()' in namespace</FONT>
<BR><FONT SIZE=3D2> "namespace =
cgicc".</FONT>
<BR><FONT SIZE=3D2> CGICCNS operator<<(STDNS =
ostream& out, </FONT>
<BR><FONT SIZE=3D2> =
^^^^^^^^^^^^^^^^^^ =
=
</FONT>
<BR><FONT SIZE=3D2>Error 172: "MStreamable.cpp", line 34 # =
Undeclared variable 'obj'.</FONT>
<BR><FONT SIZE=3D2> =
obj.render(out);</FONT>
<BR><FONT SIZE=3D2> =
^^^ &nb=
sp; </FONT>
<BR><FONT SIZE=3D2>Warning: 1 =
future errors were detected and ignored. Add a '+p' option to detect =
and fix them before they become fatal errors in a future release. =
Behavior of this ill-formed program is not guaranteed to match that of =
a well-formed program</FONT></P>
<P><FONT SIZE=3D2>make[1]: *** [MStreamable.lo] Error 1</FONT>
</P>
<P><FONT SIZE=3D2>--------------------------------------</FONT>
</P>
<P><FONT SIZE=3D2>Solution:</FONT>
</P>
<P><FONT SIZE=3D2>Add the CGICCNS in front of the parameter that it is =
complaining about:</FONT>
</P>
<P><FONT SIZE=3D2>STDNS ostream& </FONT>
<BR><FONT SIZE=3D2>CGICCNS operator<<(STDNS ostream& out, =
</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; const CGICCNS =
MStreamable& obj)</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; &nb=
sp; ^^^^^^^</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; &nb=
sp; added this</FONT>
</P>
<P><FONT SIZE=3D2>--------------------------------------</FONT>
</P>
<P><FONT SIZE=3D2>support/config.guess output:</FONT>
<BR> <FONT =
SIZE=3D2>hppa2.0w-hp-hpux11.11</FONT>
</P>
<P><FONT SIZE=3D2>uname -a</FONT>
<BR><FONT SIZE=3D2>HP-UX rp2430 B.11.11 U 9000/800 897819656 =
unlimited-user license</FONT>
</P>
<P><FONT SIZE=3D2>-------------------------------------</FONT>
</P>
<P><FONT SIZE=3D2>configure output:</FONT>
</P>
<P><FONT SIZE=3D2>loading cache ./config.cache</FONT>
<BR><FONT SIZE=3D2>checking for a BSD compatible install... =
support/install-sh -c</FONT>
<BR><FONT SIZE=3D2>checking whether build environment is sane... =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether make sets ${MAKE}... (cached) =
yes</FONT>
<BR><FONT SIZE=3D2>checking for working aclocal... missing</FONT>
<BR><FONT SIZE=3D2>checking for working autoconf... missing</FONT>
<BR><FONT SIZE=3D2>checking for working automake... missing</FONT>
<BR><FONT SIZE=3D2>checking for working autoheader... missing</FONT>
<BR><FONT SIZE=3D2>checking for working makeinfo... missing</FONT>
<BR><FONT SIZE=3D2>checking whether to enable maintainer-specific =
portions of Makefiles... no</FONT>
<BR><FONT SIZE=3D2>checking for c++... (cached) aCC</FONT>
<BR><FONT SIZE=3D2>checking whether the C++ compiler (aCC ) =
works... yes</FONT>
<BR><FONT SIZE=3D2>checking whether the C++ compiler (aCC ) is a =
cross-compiler... no</FONT>
<BR><FONT SIZE=3D2>checking whether we are using GNU C++... (cached) =
no</FONT>
<BR><FONT SIZE=3D2>checking whether aCC accepts -g... (cached) =
yes</FONT>
<BR><FONT SIZE=3D2>checking for a BSD compatible install... =
support/install-sh -c</FONT>
<BR><FONT SIZE=3D2>checking host system type... =
hppa2.0w-hp-hpux11.11</FONT>
<BR><FONT SIZE=3D2>checking build system type... =
hppa2.0w-hp-hpux11.11</FONT>
<BR><FONT SIZE=3D2>checking for ranlib... (cached) ranlib</FONT>
<BR><FONT SIZE=3D2>checking for gcc... (cached) aCC</FONT>
<BR><FONT SIZE=3D2>checking whether the C compiler (aCC ) =
works... yes</FONT>
<BR><FONT SIZE=3D2>checking whether the C compiler (aCC ) is a =
cross-compiler... no</FONT>
<BR><FONT SIZE=3D2>checking whether we are using GNU C... (cached) =
no</FONT>
<BR><FONT SIZE=3D2>checking whether aCC accepts -g... (cached) =
yes</FONT>
<BR><FONT SIZE=3D2>checking for non-GNU ld... (cached) =
/usr/bin/ld</FONT>
<BR><FONT SIZE=3D2>checking if the linker (/usr/bin/ld) is GNU ld... =
(cached) no</FONT>
<BR><FONT SIZE=3D2>checking for BSD-compatible nm... (cached) =
/usr/bin/nm -p</FONT>
<BR><FONT SIZE=3D2>checking whether ln -s works... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking whether we are using GNU C... no</FONT>
<BR><FONT SIZE=3D2>checking for object suffix... o</FONT>
<BR><FONT SIZE=3D2>checking for executable suffix... no</FONT>
<BR><FONT SIZE=3D2>checking for aCC option to produce PIC... +Z</FONT>
<BR><FONT SIZE=3D2>checking if aCC PIC flag +Z works... yes</FONT>
<BR><FONT SIZE=3D2>checking if aCC supports -c -o file.o... yes</FONT>
<BR><FONT SIZE=3D2>checking if aCC supports -c -o file.lo... yes</FONT>
<BR><FONT SIZE=3D2>checking if aCC static flag -Wl,-a -Wl,archive =
works... -Wl,-a -Wl,archive</FONT>
<BR><FONT SIZE=3D2>checking if the linker (/usr/bin/ld) is GNU ld... =
no</FONT>
<BR><FONT SIZE=3D2>checking whether the linker (/usr/bin/ld) supports =
shared libraries... yes</FONT>
<BR><FONT SIZE=3D2>checking command to parse /usr/bin/nm -p output... =
failed</FONT>
<BR><FONT SIZE=3D2>checking how to hardcode library paths into =
programs... relink</FONT>
<BR><FONT SIZE=3D2>checking for /usr/bin/ld option to reload object =
files... -r</FONT>
<BR><FONT SIZE=3D2>checking dynamic linker characteristics... hpux11.11 =
dld.sl</FONT>
<BR><FONT SIZE=3D2>checking if libtool supports shared libraries... =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether to build shared libraries... =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether to build static libraries... =
yes</FONT>
<BR><FONT SIZE=3D2>checking for objdir... .libs</FONT>
<BR><FONT SIZE=3D2>creating libtool</FONT>
<BR><FONT SIZE=3D2>loading cache ./config.cache</FONT>
<BR><FONT SIZE=3D2>checking for gethostbyaddr in -lnsl... (cached) =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether to link against libstdc++... =
(cached) yes</FONT>
<BR><FONT SIZE=3D2>checking how to run the C++ preprocessor... (cached) =
aCC -E</FONT>
<BR><FONT SIZE=3D2>checking for sys/time.h... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking whether struct tm is in sys/time.h or =
time.h... (cached) time.h</FONT>
<BR><FONT SIZE=3D2>checking host system type... =
hppa2.0w-hp-hpux11.11</FONT>
<BR><FONT SIZE=3D2>checking whether the C++ compiler (aCC) supports =
STL... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking whether the C++ compiler (aCC) supports =
namespaces... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking for ANSI C header files... (cached) =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether time.h and sys/time.h may both be =
included... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking for strftime... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking for gettimeofday... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking for uname... (cached) yes</FONT>
<BR><FONT SIZE=3D2>checking whether to use gcc verbose warnings... =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether to use the cgicc namespace... =
yes</FONT>
<BR><FONT SIZE=3D2>checking whether to enable debug logging... =
no</FONT>
<BR><FONT SIZE=3D2>checking whether to build the cgicc demos... =
yes</FONT>
<BR><FONT SIZE=3D2>creating ./config.status</FONT>
<BR><FONT SIZE=3D2>creating Makefile</FONT>
<BR><FONT SIZE=3D2>creating cgicc/Makefile</FONT>
<BR><FONT SIZE=3D2>creating cgicc/CgiDefs.h</FONT>
<BR><FONT SIZE=3D2>creating info/Makefile</FONT>
<BR><FONT SIZE=3D2>creating demo/Makefile</FONT>
<BR><FONT SIZE=3D2>creating support/Makefile</FONT>
<BR><FONT SIZE=3D2>creating support/cgicc-config</FONT>
<BR><FONT SIZE=3D2>creating cgicc/config.h</FONT>
<BR><FONT SIZE=3D2>cgicc/config.h is unchanged</FONT>
</P>
<P><FONT SIZE=3D2>------------</FONT>
</P>
<P><FONT SIZE=3D2>I'm using cgicc-3.1.5. Old, but I checked CVS and see =
that only the comments in this file have ever changed.</FONT>
</P>
<P><FONT SIZE=3D2>Adam Fanello</FONT>
<BR><FONT SIZE=3D2>Sr. Software Engineer</FONT>
<BR><FONT SIZE=3D2>Centor Software</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C24A0A.994CF0C0--