Re: Urgent: Need info on C++ Linking
From: Malte Starostik (malte.starostik_at_t-online.de)
Date: 10/22/04
- Next message: Someonekicked: "flush the stream"
- Previous message: Jack Klein: "Re: Urgent: Need info on C++ Linking"
- In reply to: sunil: "Urgent: Need info on C++ Linking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 22 Oct 2004 06:35:05 +0200
sunil schrieb:
> Hi,
> [...] I am completely new
> to C++ linking. Is there some tutorial that can explain the nuances of
> C++ linking? We do links on DIGITAL UNIX, SUN Solaris, IBMS and HP
> UNIX platforms. I compiled same cpp source files on all four platforms
> but was suprised to see that the symbol information differs widely
> across all four platforms. For C/FORTRAN code, it is pretty
> straightforward to look at o/p from nm command and see what global
> (data/function) symbols a given object file/library exports. But that
> doesnt seem to be case with C++. [...]
In C++, symbol names are "mangled" to include not only their plain
names, but also their type. How exactly this is done is
implementation-defined, that's why you see those differences between
toolsets for different platforms. Some versions of nm have an option to
demangle C++ symbol names to human readable form or your toolset might
include something like "c++filt" to pipe nm's output through. Apart
from that, linking C++ objects isn't really any different than linking C
objects. Either way, this is compiler/linker-specific and not a C++
language issue; if you have any further questions about this,
comp.unix.programmer seems to be a more adequate place to me.
Regards,
Malte
- Next message: Someonekicked: "flush the stream"
- Previous message: Jack Klein: "Re: Urgent: Need info on C++ Linking"
- In reply to: sunil: "Urgent: Need info on C++ Linking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|