We're stuck in a precarious position whereby cross compilation between
two compilers, is broken.. due to differences in name mangling.
Specifically we have a dll/lib from microsoft visual studio 2005 and
an application compiled with cbuilder 6 from borland. The problem lies
(as everybody on this forum will know all too well) in the fact that
differnent decoration/mangling systems are used. e.g.

for example a function "initialise" is mangled like this under
borlands system;

@prs@PrsGrid@initialise$qqspxct1t1p18prs@PricerCallbackui

however it looks like this under the MS mangling;

?initialise@PrsGrid@prs@@QAG_NPBD00PAVPricerCallback@2@I@Z

we link the two together by *manually* providing aliases like this to
the borland linker (via impdef and implib)

Anyways, we can get various functions to work at the moment by using
this manual approach. This wont scale obviously. Other approaches such
as using extern "C" or LoadLibrary won't scale either for us.

We are about to write a parser that will translate a micsoft mangled
name into a borland mangled name. That way we can automate the process
for all the symbols defined in the MS dll and link create a .lib that
is acceptable in the other (borland) link environment. We have the
EBNF for both name mangling systems and intend to use boost spirit to
parse and generate the translation we need.

I would be VERY VERY VERY grateful if anybody out there has already
done this. If yes, you're going to save us serious amounts of
headache. Does such a tool already exist? Is the approach we've
decided upon to use a translator a viable one? Or is the vendor
mangling scheme riddled with proprietory stuff such that doing the
translation/parsing will never work?

thanks very much for any assistance or input/feedback.
[Looks like it should be about three lines of TXL. -John]