想知道如果较低版本的visual studio可以使用dll构建使用更高版本的视觉工作室? [英] Wondering if the lower version of visual studio can use the dll built using higher version of visual studio?

查看:298
本文介绍了想知道如果较低版本的visual studio可以使用dll构建使用更高版本的视觉工作室?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在机器上安装了两个版本的Visual Studio。我想知道更低版本的visual studio是否可以使用更高版本的visual studio构建的dll。

Have both versions of visual studio installed on a machine. I am wondering if the lower version of visual studio can use the dll built using higher version of visual studio?

推荐答案

你不能在一个程序中混合使用不同版本的CRT编译的dll。 以下是MSDN文档的链接

In general, you cannot mix dlls compiled with different versions of the CRT in one program. Here's a link to the documentation at MSDN.

正如别人所说,如果你保持界面简单,它是有效的。不要释放分配给一个CRT的内存,在一个DLL链接到另一个版本的CRT,不要传递FILE *和类似的。很遗憾,很难确定您可以做什么以及不能做什么。

As others mentioned, it works if you keep the interface simple. Don't free memory allocated with one CRT in a DLL linked to another version of the CRT, don't pass FILE* and similar around. Unfortunately, it's hard to know for sure what you can do and what you can't do.

这篇关于想知道如果较低版本的visual studio可以使用dll构建使用更高版本的视觉工作室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆