Am Fri, 18 Jan 2013 18:47:41 +0100 schrieb "nazriel" <s...@dzfl.pl>:
> lib.d: > void foo() { > printf("%s".ptr, "hi".ptr); > } > > test.d: > extern(C) void _D3lib3fooFZv(); > I think this is dangerous, there's no guarantee that extern(D) equals extern(C). > How to handle name > mangling? > Maybe pragma(mangleOf, "") by Alex Petterson could help. extern(D) + pragma(mangleOf) could work. But it's probably simpler and safer to just write a .di file for that function manually: lib.di: module lib; void foo();