Nested C++ namespace library linking

Guillaume Chatelet via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 21 08:17:48 PST 2015


On Wednesday, 21 January 2015 at 14:59:15 UTC, John Colvin wrote:
> Looks like a bug to me, for sure.
>
> In the mean-time you may be able to use some pragma(mangle, 
> ...) hacks to force the compiler to emit the right symbols.

Thx John,

extern(C++, A.B) {
   struct Type {}
   pragma(mangle,"_ZN1A1B3fooENS0_4TypeE") int foo(Type unused);
}

is indeed linking correctly :)


More information about the Digitalmars-d-learn mailing list