Are C++ libs created with different versions of Visual Studio compatible with each other?

后端 未结 4 818
遥遥无期
遥遥无期 2020-12-03 05:07

I am creating a open-source C++ library using Visual Studio 2005. I would like to provide prebuilt libs along with the source code. Are these libs, built with VS2005, also g

4条回答
  •  青春惊慌失措
    2020-12-03 05:32

    If your library project is a static library, then, you'll have to supply a build for every Visual Studio version that you want your users to be in. In the example you gave, that equates to providing both a VS2005 and a VS2008 library.

    If your library project is a dynamic library, then, you evade the problems somewhat, but, it means that users will need to make sure that they use the 'Microsoft C Runtime' that's compatible with your build environment. You can eliminate that criteria should you statically link the 'Microsoft C Runtime' into your dynamic library.

提交回复
热议问题