Linking C libraries with DMD

Dibyendu Majumdar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 21 14:02:57 PST 2016


On Thursday, 21 January 2016 at 21:55:10 UTC, jmh530 wrote:
>>
>> For the latter - on Windows 10 b64-bit - I am using following 
>> options for example:
>>
>> -shared -L/LIBPATH:c:\\lib  -L//IMPLIB:mylib.lib
>>
>
> I'm not having any luck using your options with dmd either 
> (excluding -shared because I don't need to create a shared D 
> library).

Sorry forgot to mention that I also include the library I am 
linking to. Example:

dmd -m64 prog.d -L/LIBPATH:c:\lib -Lyourlib.lib

Where yourlib.lib and yourlib.dll are in c:\lib folder.


More information about the Digitalmars-d-learn mailing list