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

后端 未结 5 2015
时光说笑
时光说笑 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 23:07

    On the command line use:

    cl.exe /LD 
    

    or, if you prefer the more verbose & explicit version:

    cl.exe /D_USRDLL /D_WINDLL   /link /DLL /OUT:.dll
    

提交回复
热议问题