View Single Post

   
  #1 (permalink)  
Old 01-16-2008, 08:41 PM
wiseversa@gmail.com
 
Posts: n/a
Default Compiling for IA-64 - Error in

Hello,

I am trying to compile some code that uses ofstream. I guess it is
trying to instantiate basic_filebuf and is throwing these errors.

If I look at the gcc install, showmanyc is defined to return
std::streamsize in both the files. But somehow, showmanyc, as
overridden by basic_filebuf is returning int (I guess once all the
typedefs/defines are susbstituted.).

If I look for *showmanyc return type* on google, it get whole bunch of
pages with similar errors but looks like it was a defect in STD lib and
has been fixed.

I'd really appreciate it if someone can throw in a hint.. (am I missing
a -D option?). I am getting similar errors for g++ and aCC. Also, I am
using ObjectSpace's libary.

Thanks
Abhay

Here is the commandline for GCC

/opt/hp-gcc/bin/g++ -I/u/gToolKit -I../GeneralUtilities -D_GNU_SOURCE
-DOS_HPUX_11_00 -DOS_USE_ALTERNATE_STD -DOS_STL_ASSERT -DOS_NO_WSTRING
-DOS_NO_ALLOCATOR_REBIND -DOS_ENABLE_MEMBER_TEMPLATE_FEATURES
-DOS_MULTI_THREADED -DOS_HPUX_PTHREADS -DOS_PTHREADS -D_HPUX_SOURCE
-D_REENTRANT -D_THREAD_SAFE -c -fPIC -mlp64 $1.cpp -o $1.o


Here is the error-
/opt/hp-gcc/4.0.2/bin/../lib/gcc/ia64-hp-hpux11.23/4.0.2/../../../../include/c++/4.0.2/iosfwd:
In instantiation of 'std::basic_filebuf<char, std::char_traits<char>
>':

/opt/hp-gcc/4.0.2/bin/../lib/gcc/ia64-hp-pux11.23/4.0.2/../../../../include/c++/4.0.2/bits/fstream.
tcc:890: instantiated from here
/opt/hp-gcc/4.0.2/bin/../lib/gcc/ia64-hp-pux11.23/4.0.2/../../../../include/c++/4.0.2/bits/fstream.
tcc:165: error: conflicting return type specified for 'int
std::basic_filebuf<_CharT, _Traits>::showmanyc() [with _CharT = char,
_Traits = std::char_traits<char>]'
/opt/hp-gcc/4.0.2/bin/../lib/gcc/ia64-hp-hpux11.23/4.0.2/../../../../include/c++/4.0.2/streambuf:623:
error: overriding 'std::streamsize std::basic_streambuf<_CharT,
_Traits>::showmanyc() [with _CharT = char, _Traits =
std::char_traits<char>]'

Similar error is reported by aCC as well.

Here is aCC commandline-
/opt/aCC/bin/aCC -I/u/ToolKit -I/opt/aCC/include_std
-I/opt/aCC/include -I/usr/lib -ext +DD64 -D__LP64__ -AA -Aa +p
-DOS_HPUX_11_00 -DOS_USE_ALTERNATE_STD -DOS_STL_ASSERT -DOS_NO_WSTRING
-DOS_NO_ALLOCATORS -DOS_ENABLE_MEMBER_TEMPLATE_FEATURES
-DOS_MULTI_THREADED -DOS_HPUX_PTHREADS -DOS_PTHREADS -D_HPUX_SOURCE
-D_REENTRANT -D_THREAD_SAFE -D_RWSTD_MULTI_THREAD -c +Z $1.cpp -o $1.o

Reply With Quote