How to build a DLL from the command line in Windows using MSVC

后端 未结 5 2016
时光说笑
时光说笑 2020-11-29 22:28

I\'ve been doing C for about 20 years but I\'ve never built a DLL; I\'ve always prefered to statically link.

I use the command line - cl.exe, etc - and gnumake makef

5条回答
  •  渐次进展
    2020-11-29 22:52

    Turns out it happens automatically.

    If you have exported functions (e.g. /export, __declspec(dllexport), etc) the linker will automatically generate the .lib file (you do of course need /dll on the linker command line).

提交回复
热议问题