Use Visual Studio 2012 and compile with older platform toolset?

前端 未结 4 1627
逝去的感伤
逝去的感伤 2020-12-01 07:39

The problem

I\'m using Visual Studio 2012 to develop C++ DLLs. On some machines these DLLs can not be loaded, because the platform toolset, which is

4条回答
  •  一个人的身影
    2020-12-01 08:26

    I'd like to share some information, which I came across and figured out how to use them for my purpose.

    Apparently it is a good option to use static linking. It didn't always work for me, but for a smaller project of mine, it works quite good. And the result is a DLL with no dependencies other than kernel32.dll and the like.

    Simply use /MT for release configuration and /MTd for debug and you'll be fine.

    The problem here is that a developer like me gets the current Visual Studio version, shortly after its release, but you can't really expect common users to have runtimes installed which are only a few weeks old. And installing different versions of Visual Studio just to use the old runtime is definitely not what you want.

    Static linking in Visual Studio 2013

提交回复
热议问题