[Coin-discuss] Question about building [Cbc, Clp, etc.] in Visual Studio

Lou Hafer lou at cs.sfu.ca
Mon Oct 18 15:51:39 EDT 2010


Folks,

	Michael Hennebry commented that there are programs to do
mangling/unmangling of C++ names. Martin Mueller added that in the
Windows world one decorates/ undecorates and the relevant program is
undname. On the side, Michael and I exchanged a bit of email which might
be more broadly useful. I replied

>> [ ... there are tools for mangling/unmangling ... ]
>
>       Yep --- undname is the tool in the MS world. But what's needed
> in the .def files is the mangled names. Seemed to me that scanning the
> C++ source for unmangled names was a nonstarter. Hence the attempt to
> extract the right mangled names from the .obj files, without
> __declspec as a hint. Turns out there's a lot of dross to filter away
> and it's easy to toss the baby with the bathwater.

And Michael wrote back:

> I got the impression that the problem was not getting the names.
> It was deciding which ones to use.
> 'Twas the decision-making that I thought could use demangle or
> undname. An iteration would be:
>   get mangled_name
>   if is_market_for(demangle(mangled_name)):
>     export mangled_name

Which is on the mark. Unfortunately, is_market_for is beyond me. The
library, more or less by definition, is built in isolation from the
customers. The solution I have almost certain exports more symbols than
it should, but so far I have no good way to discriminate. My only proof
that it exports enough is when dependent applications build
successfully.

	I actually have this committed for CoinUtils, Osi, and Clp. If you're
using trunk code, you can check it out as v9alt. It's only tested for a
32-bit debug build, in one environment (Visual Studio 2008 v9.0, Windows
7). You need powershell. If anyone's interested in doing alpha testing,
let me know and I'll try to cobble together some instructions on how to
use it.

						Lou





More information about the Coin-discuss mailing list