How do I create both a .lib file and an .exe file in Visual C++?

前端 未结 5 1866
后悔当初
后悔当初 2021-02-07 10:51

I currently have a console project which creates an .exe file; I want it to also create a .lib file so other projects, compiled as DLLs, would be able to call functions from the

5条回答
  •  我在风中等你
    2021-02-07 11:42

    You don't "also link a lib", you create a static library project. The latter doesn't call the linker at all -- instead it compiles all your files with cl /c and combines the resulting .objs into a lib using lib.exe.

提交回复
热议问题