[cfe-dev] Remove leading underscores from exported symbols

Reid Kleckner rnk at google.com
Fri Oct 11 10:27:40 PDT 2013


Clang adds the prefix because it's part of the ABI.  It's what both MSVC
and gcc do for functions declared with the C calling convention on 32-bit
Windows.  Why is the underscore prefix missing for Python?


On Fri, Oct 11, 2013 at 9:59 AM, Ryan Gonzalez <rymg19 at gmail.com> wrote:

> Hello,
>
> I noticed something about when Clang exports symbols: they are exported
> with a leading underscore(`_`). This can cause linker errors like crazy
> when building shared libraries or Python extensions under Windows. My
> request is that the leading underscore is removed. I'm not sure if this is
> in LLVM, not Clang, but it causes problems on Windows nonetheless.
>
> Also, please alert me is I am posting in the wrong mailing list. I'm kinda
> new here... :)
>
> --
> Ryan
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131011/9af9ca2c/attachment.html>


More information about the cfe-dev mailing list