problem linking with GCC 3.0 -- undefined reference to `std::codecvt<char, char, __mbstate_t>::id
Mark Martin
mmartin@integratedgenomics.com
Wed Jul 11 09:33:00 GMT 2001
After recovering a little bit from pounding my head against the wall on
this problem, I realized that I omitted several pieces of important information
in my previous message. I'm running Linux Mandrake 7.2 and I built gcc 3.0
and binutils from source. My system also has the package gcc-2.95.2-12mdk
installed on it and I have installed gcc 3.0 under /usr/local. I also built
glibc 2.2.3 using gcc 3.0 and installed it under /usr/local.
The portion of my Makefile relevant to the link command is
OBJ = admin4pgdb.o ecompound.o ereaction.o epathway.o emsubsystem.o ecell.o driver_dbsmatrix.o
CC = /usr/local/bin/g++ -O2 -Wall
VERBOSE = -v -Wl,--verbose
LFLAGS = -nostdlib -nostartfiles -L/usr/local/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0
LINKER = -Wl,-dynamic-linker=/usr/local/lib/ld-linux.so.2
RPATH = -Wl,-rpath=/usr/local/lib,-rpath=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0
LIBS = -lstdc++ -lm -lpq
$(CC) $(VERBOSE) $(OBJ) -o smatrix $(LFLAGS) $(LINKER) $(RPATH) $(LIBS)
I am attaching the output from make. As I mentioned before, any help would be
greatly appreciated, even if it amounts to telling me that I'm an idiot.
Thank you very much,
Mark
On Wednesday 11 July 2001 07:30, Mark Martin wrote:
> The following problem has been preventing me from linking when using
> streams in C++ code with GCC 3.0
>
> In function `std::basic_streambuf<char, std::char_traits<char> >::overflow(int)':
>
> /usr/local/include/g++-v3/bits/std_streambuf.h(.gnu.linkonce.t._ZSt9use_fac
>etISt7codecvtIcc11__mbstate_tEERKT_RKSt6locale+0xc): undefined reference to
> `std::codecvt<char, char, __mbstate_t>::id'
>
> This is the same problem linking that Vickle Chan reported on June 15 on
> gcc-help (See http://gcc.gnu.org/ml/gcc-help/2001-06/msg00113.html ) and
> that Dirk Bonekamper reported as a bug on July 6 on gcc-bugs (See
> http://gcc.gnu.org/ml/gcc-bugs/2001-07/msg00247.html ).
>
> I have read all of the relevant FAQs and I have tried several different
> approaches to fixing this problem, including installing the most recent
> versions of codecvt.h, locale_facets.tcc, stream_iterator.h, streambuf.tcc,
> and streambuf_iterator.h from the CVS repository. I would be happy to
> gather and provide whatever data might be relevant to fixing this problem.
>
> Any help with this problem would be greatly appreciated!
>
> Mark
More information about the Gcc-help
mailing list