Optional name mangling

dnewbie run3 at myopera.com
Mon Jul 23 15:53:51 PDT 2012


On Monday, 23 July 2012 at 20:57:37 UTC, Stuart wrote:
> On Monday, 23 July 2012 at 17:28:38 UTC, David Nadlinger wrote:
>> On Monday, 23 July 2012 at 17:25:43 UTC, Stuart wrote:
>>> Fair enough. But there are still times when we need a version 
>>> of "export" that doesn't mangle.
>>
>> No. This is even impossible to do with some compiler backends. 
>> For example, LLVM on OS X automatically appends an underscore 
>> to the beginning of symbol names, because every C function has 
>> an »extra« underscore at the beginning there.
>
> I mean for importing. The functions in shlwapi.lib don't have 
> underscores. We ought to have some kind of syntax for importing 
> them without faffing about with .def files. Surely it must be 
> possible?

Hi Stuart.

If you have the Windows SDK you can run

coffimplib "C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.0A\Lib\shlwapi.lib" 
C:\D\dmd2\windows\lib\shlwapi.lib

We could run coffimplib on *.lib from the Windows SDK and include 
the resulting OMF libraries on the dmd.zip package. I don't know 
if it is 'legal'.




More information about the Digitalmars-d mailing list