Linking with MSVC built static library

Mihails a at a.a
Fri Mar 15 13:32:04 UTC 2019


Hello, are there any specific requirements for linking with MSVC 
.lib?

I am trying a somewhat naive approach:

- build C library separately with VS (generates 
"mylib\x64\Release\mylib.lib")
- specify `libs "mylib\\x64\\Release\\mylib"` in dub.sdl
- use `extern(C)` declaration in one of D modules
- run regular `dub build -a x86_64`

It fails with this linker error:

lld-link: error: unknown file type: x64\Release\wrapper.obj

Is there anything I am missing? I am not too familiar with 
Windows build process in general.


More information about the digitalmars-d-ldc mailing list