This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

v3.0.4 vs. v2.95.3, Solaris 8, basic_ostream/fstream weirdness



I'm a sysadmin trying to fix a problem for a developer (sound familiar? ;).
They've managed to get their code compiling just fine with g++ v2.95.3, but
v3.0.3 and subsequently v3.0.4 won't work.  This is the error they get:

laurel:smi-src>make -f sc_demo.mk
/usr/local/bin/g++ -c -I./include ./src/scd_main.cpp
In file included from src/scd_main.cpp:11:
include/rsdr_file.h: In member function `void
rsdr_file::write_data_header()':
include/rsdr_file.h:320: no matching function for call to 
   `std::basic_fstream<char, std::char_traits<char> >::write(unsigned
char*, 
   unsigned int)'
/usr/local/include/g++-v3/bits/ostream.tcc:370: candidates are: 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = 
   std::char_traits<char>]


This is repeated a lot for different lines.  I've poked around with the
includes in rsdr_file.h, as I know they had to make #include changes
when they ported the code from Solaris's 4.2 CC compiler to gcc-2.95.3,
but to no avail.  Presently, they look like this:

#include <stdlib.h>
// #include <bits/std_fstream.h>
#include <ostream.h>
#include <fstream.h>
#include <string.h>
#include <math.h>
#include <iomanip.h>


I've tried putting the bits/std_fstream.h in there, but that didn't
work.  I've tried referencing these header files without the .h's, and
that didn't work.  I feel this is a deeper implementation problem at
some level, but I don't know enough about the differences in the
compiler or about C++ to be able to solve the problem.  Simpler
copmiles, like hello-world and the like, do work.  I'm presently working
on installing DejaGnus so I can run the testsuite for more insight.

Here's some info on /usr/local/bin/g++, that I just built and installed
today (same problem as with v3.0.3, as above):

laurel:smi-src>/usr/local/bin/g++ -v
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs
Configured with: ../configure --prefix=/usr/local
Thread model: posix
gcc version 3.0.4

laurel:smi-src>/usr/local/bin/g++ -print-libgcc-file-name
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/libgcc.a


Any help or hints would be much appreciated!



-- 
      Dave ``Dragon'' Michaels       |   "I wonder what news is doing..."
     Raytheon  IS Unix Engineer      | news@newshost <29> ps -fu news
  dmichael@redwood.rsc.raytheon.com  | news 18624 12367  2  0:00 makehistory 
             303-344-6840            |      "News is making history."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]