This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: wrong files in libstdc++.a?
- To: "Mark E." <snowball3@usa.net>
- Subject: Re: wrong files in libstdc++.a?
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Wed, 14 Apr 1999 18:15:14 -0700 (PDT)
- cc: libstdc++@sourceware.cygnus.com
> ../build/src/.libs/libstdcxx.a(basic_file.o)(.text+0x27):basic_file.cc:
> undefined reference to `_IO_file_init'
> ../build/src/.libs/libstdcxx.a(basic_file.o)(.text+0x60):basic_file.cc:
> undefined reference to `_IO_do_write'
> ../build/src/.libs/libstdcxx.a(basic_file.o)(.text+0x169):basic_file.cc:
> undefined reference to `_IO_link_in'
These are defined in the libio subdirectory: go into your build
directory, and cd into libio.
Do:
nm -A *.o | grep _IO_link_in
to see where this should be coming from . . . for example, I get:
%nm -A *.o |grep _IO_link_in
fileops.o: U _IO_link_in
genops.o:00000050 T _IO_link_in
So you need to make sure that genops.o is being linked in correctly for
the static library, genops.lo for the shared library.
> I used 'nm' to try and find those symbols in libstdc++.a, but they weren't
> even listed as undefined. A listing of the files in libstdc++.a generated
> by 'ar' listed below reveals that at some point .lo files are being stored
> instead of the .o files. This doesn't seem right to me. Shouldn't they all
> be .o files in my target?
shared == .lo
static == .o
I am assuming you are building both.
-Benjamin