How to convert a static library project into a dll project in VS2005

谁都会走 提交于 2019-12-06 15:39:34

The way I've done this, and this may not be the "best" way, was to create a new project with the right settings (DLL in this case) and then create the stub methods with the wizards that I want to expose from the static library.

Then you have two choices, you can leave the real code in the static library and just have your stubs in the DLL call into the static library, or you can copy the code out of the static library project and retire the static library entirely.

The advantage of the first option is that you can support both the static library and the DLL without having to duplicate a lot of work. But if you can get rid of supporting the static library entirely the second option is probably better because you don't have to make changes in two different projects (adding the stub method in the DLL and the real code to the static lib) every time you want to add a new method/property. YMMV

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!