how to import .lib library

Marcone marcone at email.com
Sun Aug 15 11:13:36 UTC 2021


On Sunday, 15 August 2021 at 09:49:39 UTC, Timofeyka wrote:
> Hello!
> I may have a very stupid question, but still.
> How do I include a .lib library? How to use it in your code?

Inside the source code you can use pragma. Example:

pragma(lib, "gdi32.lib");

In DMD command line you can use -L flag that pass the lib to 
linker. Example:

dmd -Lgdi32.lib mycode.d


More information about the Digitalmars-d-learn mailing list