Why export external(C) generate mangled names?
Daniel Kozak
kozzi11 at gmail.com
Fri Oct 25 10:56:53 UTC 2019
On Fri, Oct 25, 2019 at 12:35 PM Suliman via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> I thought that export extern(C) is needed for C compatibility.
> But When I am compiling follow code
>
> export extern(C)
> {
> void foo()
> {
> }
> }
>
> I am getting section that have mangled names:
>
> � foo.d � �7nO � � CV �,
> FLAT _TEXT CODE _DATA DATA CONST _BSS BSS � � � i
> � i � i � � _foo �
> � � _foo � FMB FM FME � � � � � �
> � __D3foo12__ModuleInfoZ �
>
> � � foo �
> � � �
>
> Why is __D3foo12__ModuleInfoZ added to obj file?
Try to compile with -betterC
More information about the Digitalmars-d
mailing list