Available in nm but linker reports 'Symbol referencing errors'

Hi,

My g++ linker gives the following error:

Undefinedfirst referenced

symbolin file

RWDate::RWDate(unsigned int, unsigned int, unsigned int)/var/tmp/cceHniVx.o

ld: fatal: Symbol referencing errors. No output written to a.out

collect2: ld returned 1 exit status

But my nm -C gives the following output.

=============

nm -C /ilx/src/Published/rw/CURRENT/lib/sco5.ansi/librw.a | grep RWDate::RWDate

00000000000002d0 T RWDate::RWDate(tm const*)

00000000000003a0 T RWDate::RWDate(RWCString const&, RWLocale const&)

0000000000000170 T RWDate::RWDate(unsigned, char const*, unsigned, RWLocale const&)

0000000000000070 T RWDate::RWDate(unsigned, unsigned)

[b]0000000000000240 T RWDate::RWDate(unsigned, unsigned, unsigned)[/b]

0000000000000280 T RWDate::RWDate(tm const*)

0000000000000320 T RWDate::RWDate(RWCString const&, RWLocale const&)

00000000000000e0 T RWDate::RWDate(unsigned, char const*, unsigned, RWLocale const&)

0000000000000000 T RWDate::RWDate(unsigned, unsigned)

0000000000000200 T RWDate::RWDate(unsigned, unsigned, unsigned)

U RWDate::RWDate(tm const*)

U RWDate::RWDate(tm const*)

0000000000000320 T RWDate::RWDate(RWTime const&, RWZone const&)

U RWDate::RWDate(unsigned, unsigned)

00000000000002c0 T RWDate::RWDate(RWTime const&, RWZone const&)

U RWDate::RWDate(tm const*)

===============

Does it mean the function 'RWDate::RWDate(unsigned int, unsigned int, unsigned int) ' resolved or unresolved.

0000000000000240 T RWDate::RWDate(unsigned, unsigned, unsigned)

For some other functions there are multiple lines with

[i]0000000000001460 T Msg::clear()

U Msg::clear()

U Msg::clear()

U Msg::clear() [/i]

What does it mean is this Msg::clear defined or not.

Please advice me how to solve this linking problem.

Thanks in advance

Madhav.

[2025 byte] By [Madhavwg] at [2007-11-26 10:03:32]
# 1
The T means text, and the U means undefined.You need to have one and only one T instance of a function for the link to work correctly.See the nm man page for more details.Paul
Paul_Floyd at 2007-7-7 1:37:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Paul,

Thank you. Why does my library showing multiple instances of a function with T and U both. Do you mean the library is not built properly or corrupted. And when there is one T instance available in the library why is it not able to link. How to get rid of this problem. The library is not in my control ( I dont have source files to rebuild).

Can you suggest any (other than man nm) other tools or URLs for understanding libraries better.

Thanks

Madhav

Madhavwg at 2007-7-7 1:37:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

This is where I usually go when I found difficult to explain certain linker behviour:

http://docs.sun.com/app/docs/doc/817-1983?q=audit

In particular, specifying some ld debugging options through LD_OPTIONS might help (it usually helps me):

http://docs.sun.com/app/docs/doc/817-1983/6mhm6r4el?q=audit&a=view

MaximKartashev at 2007-7-7 1:37:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...