compile: link dynamic OR static library in Windows

Alexander Zhirov azhirov1991 at gmail.com
Mon Feb 6 07:43:52 UTC 2023


On Monday, 6 February 2023 at 06:59:09 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> On other platforms the -Lfile I think would work.
>
> On Windows you have to link against the import library not DLL 
> directly.
>
> You can pass it to the compiler:
>
> $ dmd -i "-L/LIBPATH:C:\Program Files\PostgreSQL\15\lib" pq.lib 
> app.d
>
> Should work. Sorry, I should have revisted this from the get 
> go, rather than just tinkering with what others were posting.

It doesn't work anyway...

Is it possible to collect all this from under mingw so that the 
linker is not Microsoft, but `ld'?


More information about the Digitalmars-d-learn mailing list