TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG-DEVEL:124] C++/C linking problems
"John R. Sheets" wrote:
> On Thursday, March 02, 2000, "Scott J. Pekarek" <sjp@gofast.net> wrote:
> > "Scott J. Pekarek" wrote:
> >
> > I may end up with a conversation with myself. I figured out why many
> > of the symbols where unreferenced. It had to do with the mechanics
> > of how I built one of the shared libraries. Now it is off to how to get
> > templates to properly instantiate in a shared library. I could still
> > use some clues here and if someone has pointers I would be grateful.
> > I am currently studying the gcc on-line man pages at www.org.gnu.
>
> One handy little trick you can use to see exactly which target files
> contain which symbols is to pipe 'nm' through 'grep'.
>
> $ nm myapp | grep myfunc
> 08135c2c T myfunc
>
> $ nm libwhatever.so | grep myfunc
> U myfunc
>
> The "T" means it's linked into the executable/object file/library. The
> "U" means it's undefined in that file, which means that the linker must
> connect it up later. This is a good way to double-check your results,
> or go rooting around to find out where the symbols ended up.
>
> Sorry if I'm repeating something you already know. You didn't give many
> specifics to go on.
I had tried the "nm --print-armap" but I had not figured out what the
letters meant. Where did you find what they meant?
Thanks for the info!
sjp
>
>
> John
>
> --
> dusk@ravendusk.org http://www.gnome.org
> jsheets@codeweavers.com http://www.worldforge.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-devel-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-devel-help@mn-linux.org