This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Can't compile fstream.h
>
>
> > > I still can't compile fstream.h.
> >
> > Would you post a code snippet that produces the error you describe?
> > This will help reproducing your problem and possibly fixing a bug in
> > egcs.
> >
>
> I'm sending you the following files: sngoa/config/config
> // compilation parameters
> /config.machine // edit home directory
> sngoa/lib/localbase.cc // trying to compile this file will
> produce the error
> /Makefile
> sngoa/include/localbase.hh
> sngoa/bin/sngoa.slave.cc // trying to link sngoa.slave.o produces
> another error
> /Makefile
>
> This code cannot be fully compiled, because there are many files missing.
> The project, in any compilable version, is quite big (>1M). Anyway, it's
> enough to produce the 1st error.
> Working around it, I discovered that I always get to compile the code the
> second time. It reminds me that if people used software engineering to
> repair cars.
> So, I've got to compile the libs, but linking sngoa.slave produces the
> errors:
>
> "
> ...undefined reference to ios::virtual table...
> ...undefined reference to ostream::virtual table...
> ...undefined reference to ofstream::virtual table...
> "
>
> The full listing is attached.
>
> Thanks for your help,
>
> Alessandro Coelho Ribeiro
> (sandro@agentel.com.br,sandro@cos.ufrj.br,sandro@acm.org)
>
> > --
> > Alexandre Oliva
> > mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
> > http://www.dcc.unicamp.br/~oliva
> > Universidade Estadual de Campinas, SP, Brasil
sngoa.tar.gz
g++ -Wunused -o LINUX/sngoad.slave sngoad.slave.cc -lSNGOA -L/home/sandro/myprog/sngoa.0.1.4/../../sngoa/lib -L/home/sandro/myprog/sngoa.0.1.4/lib/LINUX -lCPRE -L/home/sandro/myprog/sngoa.0.1.4/../../sngoa/lib -L/home/sandro/myprog/sngoa.0.1.4/../CPREL/LINUX -lpvm3 -L/usr/local/pvm3/lib/LINUX -I/home/sandro/myprog/sngoa.0.1.4/include -I/home/sandro/myprog/sngoa.0.1.4/../CPREL -O3 -g -DOS_LINUX -DUSER=\"sandro\" -DHOMEDIR=\"/home/sandro/myprog/sngoa.0.1.4/../../\" -DSNGOADIR=\"/home/sandro/myprog/sngoa.0.1.4/../../sngoa/\" -DDBDIR=\"/home/sandro/myprog/sngoa.0.1.4/../../sngoa/databases/\" -D_REENTRANT -D_REENTRANT -lpthread
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/streambuf.h:466: undefined reference to `ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/iostream.h:49: undefined reference to `ostream::ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/fstream.h:72: undefined reference to `ofstream::ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/streambuf.h:466: undefined reference to `ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/iostream.h:49: undefined reference to `ostream::ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `SngoaDebug::open_logfile(char *)':
/usr/local/include/g++/fstream.h:72: undefined reference to `ofstream::ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `operator<<(SngoaDebug &, char *)':
/usr/local/include/g++/streambuf.h:466: undefined reference to `ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `operator<<(SngoaDebug &, char *)':
/usr/local/include/g++/iostream.h:49: undefined reference to `ostream::ios virtual table'
/home/sandro/myprog/sngoa.0.1.4/lib/LINUX/libSNGOA.a(debug.o): In function `operator<<(SngoaDebug &, char *)':
/usr/local/include/g++/fstream.h:72: undefined reference to `ofstream::ios virtual table'
collect2: ld returned 1 exit status
make: *** [LINUX/sngoad.slave] Error 1