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

前端 未结 5 1867
后悔当初
后悔当初 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:38

    If any symbol in a Application (.exe) project is exported (e.g. with __declspec(dllexport) ), both the .exe and the .lib files will be generated See: Why does my Visual C++ .exe project build create .lib and .exp files?

提交回复
热议问题