This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: wrong files in libstdc++.a?


> ../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


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