How to link a .DLL statically?

后端 未结 4 1969
庸人自扰
庸人自扰 2020-12-09 15:35

We have a (pure native C++) .DLL that is build by VS. As clients we have some native C++ applications and a .Net-Wrapper around this DLL written in C++/CLI. Finally there ar

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 16:23

    Another option is to have two projects, one project will output a .lib which can be statically linked, and a second project which will output a .dll and will have your .lib as dependency, you should add .def to your .dll with the symbols that you are planning to export, or else it will be empty.

提交回复
热议问题