public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6789: Error including 'fstream' on Solaris 2.6
@ 2002-05-23 16:26 sandic
0 siblings, 0 replies; only message in thread
From: sandic @ 2002-05-23 16:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 6789
>Category: c++
>Synopsis: Error including 'fstream' on Solaris 2.6
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu May 23 16:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: sandic@xtra.co.nz
>Release: unknown-1.0
>Organization:
>Environment:
sparc-sun-solaris2.6
SunOS hutt 5.6 Generic_105181-30 sun4u sparc SUNW,Ultra-Enterprise
>Description:
When the program includes <fstream> the <prefix>/include/g++-v3/bits/basic_file.h is included before the <prefix>/include/g++-v3/sparc-sun-solaris2.6/bits/basic_file.h, causing the compiler to not to recognise the typedef __c_file. The order of include search seems to be wrong. The text below shows the full output from a simple compile session.
-------------------------------------------------
n179339:programs$ g++ -v -c hello_world.cpp
Reading specs from /home/ap_share/lib/gcc-lib/sparc-sun-solaris2.6/3.1/specs
Configured with: ../gcc-3.1/configure --prefix=/home/ap_share --enable-languages=c,c++,java --with-gnu-ld --with-ld=/home/ap_share/bin/gnu-ld --with-gnu-as --with-as=/home/ap_share/bin/gnu-as
Thread model: posix
gcc version 3.1
/home/ap_share/lib/gcc-lib/sparc-sun-solaris2.6/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc hello_world.cpp -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase hello_world.cpp -version -o /var/tmp//ccdEbzWL.s
GNU CPP version 3.1 (cpplib) (sparc ELF)
GNU C++ version 3.1 (sparc-sun-solaris2.6)
compiled by GNU C version 3.1.
#include "..." search starts here:
#include <...> search starts here:
/home/ap_share/include/g++-v3
/home/ap_share/include/g++-v3/sparc-sun-solaris2.6
/home/ap_share/include/g++-v3/backward
/usr/local/include
/home/ap_share/include
/home/ap_share/lib/gcc-lib/sparc-sun-solaris2.6/3.1/include
/home/ap_share/sparc-sun-solaris2.6/include
/usr/include
End of search list.
/home/ap_share/bin/gnu-as --traditional-format -V -Qy -s -o hello_world.o /var/tmp//ccdEbzWL.s
GNU assembler version 2.12 (sparc-sun-solaris2.6) using BFD version 2.12
>How-To-Repeat:
Just say:
#include <fstream>
at the top of your source, and try compiling.
>Fix:
Temporary fix:
Renamed the <prefix>/include/g++-v3/bits/basic_file.h to something else (or remove it completely) and the one from the platform include directory will be picked up.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-23 23:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-23 16:26 c++/6789: Error including 'fstream' on Solaris 2.6 sandic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).