Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: amartin@denton.zko.dec.com (Alan H. Martin)
Subject: Re: question on getting mangled names using 'nm'
Date: 1995/12/10	[thread overview]
Message-ID: <4aeqhn$k5j@zk2nws.zko.dec.com> (raw)
In-Reply-To: DJ2rJ7.8H4@plato.ds.boeing.com

In article <DJ2rJ7.8H4@plato.ds.boeing.com> scott@hakuin.boeing.com writes:
>I am using the DEC-Alpha C++ compiler and need to connect the code
>to other non c++ tools, such as C and Ada. Unfortunately
>I don't know the name of the externals in the C++ code, ...

On any platform, if you want a C++ routine named a_proc to be callable from
other languages like C, then unless you need function overloading or want
type-safe linkage, don't declare it like this:

a_proc() { ... }

declare it using a linkage specification like this:

extern "C" a_proc() { ... }
	-or-
extern "C" {
a_proc() { ... }
}

>... and my use of the unix 'nm' tool isn't helping. It seems to print a
>pretty name instead of the mangled name.

If you want nm to print C++ mangled names, feed it one of the switches
-mangled_name_only or -mangled_name_also.
				/AHM
-- 
Alan Howard Martin				AMartin@TLE.ENet.DEC.Com



      parent reply	other threads:[~1995-12-10  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-04  5:00 question on getting mangled names using 'nm' Scott Moody, 773-8600
1995-12-06  5:00 ` Tim Lucia
1995-12-10  5:00 ` Alan H. Martin [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox