使用DLL有什么优缺点?

时间:2022-10-17 17:05:23

Windows still use DLLs and Mac programs seem to not use DLL at all. Are there benefits or disadvantages of using either technique?

Windows仍然使用DLL和Mac程序似乎根本不使用DLL。使用这两种技术有利有弊吗?

If a program installation includes all the DLL it requires so that it will work 100% well, will it be the same as statically linking all the libraries?

如果程序安装包含它需要的所有DLL,以便它可以100%正常工作,它是否与静态链接所有库相同?

9 个解决方案

#1


MacOS X, like other flavours of Unix, use shared libraries, which are just another form of DLL.

与其他Unix版本一样,MacOS X使用共享库,这只是DLL的另一种形式。

And yes both are advantageous as the DLL or shared library code can be shared between multiple processes. It does this by the OS loading the DLL or shared library and mapping it into the virtual address space of the processes that use it.

并且两者都是有利的,因为DLL或共享库代码可以在多个进程之间共享。它通过操作系统加载DLL或共享库并将其映射到使用它的进程的虚拟地址空间来完成此操作。

#2


On Windows, you have to use dynamically-loaded libraries because GDI and USER libraries are avaliable as a DLL only. You can't link either of those in or talk to them using a protocol that doesn't involve dynamic loading.

在Windows上,您必须使用动态加载的库,因为GDI和USER库只能作为DLL使用。您无法使用不涉及动态加载的协议链接其中任何一个或与它们通信。

On other OSes, you want to use dynamic loading anyway for complex apps, otherwise your binary would bloat for no good reason, and it increases the probably that your app would be incompatible with the system in the long run (However, in short run static linking can somewhat shield you from tiny breaking changes in libraries). And you can't link in proprietary libraries on OSes which rely on them.

在其他操作系统上,您希望无论如何都要为复杂的应用程序使用动态加载,否则您的二进制文件将无缘无故地膨胀,并且它会增加您的应用程序从长远来看与系统不兼容的可能性(但是,在短期内运行静态)链接可以在一定程度上保护您免受库中微小的重大变化)。并且您无法在依赖它们的操作系统上链接专有库。

#3


Windows still use DLLs and Mac programs seem to not use DLL at all. Are they benefits or disadvantages of using either technique?

Windows仍然使用DLL和Mac程序似乎根本不使用DLL。它们是使用这两种技术的好处还是缺点?

Any kind of modularization is good since it makes updating the software easier, i.e. you do not have to update the whole program binary if a bug is fixed in the program. If the bug appears in some dll, only the dll needs to be updated.

任何类型的模块化都是好的,因为它使软件更新更容易,即如果程序中修复了错误,则不必更新整个程序二进制文件。如果错误出现在某个DLL中,则只需要更新dll。

The only downside with it imo, is that you introduce another complexity into the development of the program, e.g. if a dll is a c or c++ dll, different calling conventions etc.

imo唯一的缺点就是你在程序的开发中引入了另一个复杂性,例如:如果一个DLL是c或c ++ dll,不同的调用约定等。

If a program installation includes all the DLL it requires, will it be the same as statically linking all the libraries?

如果程序安装包含它需要的所有DLL,它是否与静态链接所有库相同?

More or less yes. Depends on if you are calling functions in a dll which you assume static linkage with. The dll could just as well be a "free standing" dynamic library, that you only can access via LoadLibrary() and GetProcAddress() etc.

或多或少是的。取决于你是否在一个你假设静态链接的dll中调用函数。 dll也可以是一个“独立”动态库,只能通过LoadLibrary()和GetProcAddress()等访问。

#4


One big advantage of shared libraries (DLLs on Windows or .so on Unix) is that you can rebuild the library and its consumers separately while with static libraries you have to rebuild the library and then relink all the consumers which is very slow on Unix systems and not very fast on Windows.

共享库(Windows上的DLL或Unix上的.so)的一大优点是,您可以单独重建库及其使用者,而使用静态库则必须重建库,然后重新链接所有在Unix系统上非常慢的使用者在Windows上并不是很快。

#5


MacOS software uses "dll's" as well, they are just named differently (shared libraries).
Dll's make sense if you have code you want to reuse in different components of your software. Mostly this makes sense in big software projects.
Static linking makes sense for small single-component applications, when there is no need for code reuse. It simplifies distribution since your component has no external dependencies.

MacOS软件也使用“dll”,它们的命名方式不同(共享库)。如果您想要在软件的不同组件中重用代码,那么Dll是有意义的。大多数情况下,这在大型软件项目中都很有用当不需要代码重用时,静态链接对于小型单组件应用程序很有意义。它简化了分发,因为您的组件没有外部依赖性。

#6


Besides memory/disk space usage, another important advantage of using shared libraries is that updates to the library will be automatically picked up by all programs on the system which use the library.

除了内存/磁盘空间使用之外,使用共享库的另一个重要优点是,对使用该库的系统上的所有程序将自动获取对库的更新。

When there was a security vulnerability in the InfoZIP ZIP libraries, an update to the DLL/.so automatically made all software safe which used these. Software that was linked statically had to be recompiled.

当InfoZIP ZIP库中存在安全漏洞时,对DLL / .so的更新会自动使所有使用这些软件的软件都安全。静态链接的软件必须重新编译。

#7


Windows still use DLLs and Mac programs seem to not use DLL at all. Are they benefits or disadvantages of using either technique?

Windows仍然使用DLL和Mac程序似乎根本不使用DLL。它们是使用这两种技术的好处还是缺点?

Both use shared libraries, they just use a different name.

两者都使用共享库,它们只使用不同的名称。

If a program installation includes all the DLL it requires so that it will work 100% well, will it be the same as statically linking all the libraries?

如果程序安装包含它需要的所有DLL,以便它可以100%正常工作,它是否与静态链接所有库相同?

Somewhat. When you statically link libraries to a program, you will get a single, very big file, with DLLs, you will have many files.

有些。当您将库静态链接到程序时,您将获得一个带有DLL的单个非常大的文件,您将拥有许多文件。

The statically linked file won't need the "resolve shared libraries" step (which happens while the program loads). A long time ago, loading a static program meant that the whole program was first loaded into RAM and then, the "resolve shared libraries" step happened. Today, only the parts of the program, which are actually executed, are loaded on demand. So with a static program, you don't need to resolve the DLLs. With DLLs, you don't need to load them all at once. So performance wise, they should be on par.

静态链接文件不需要“解析共享库”步骤(在程序加载时会发生)。很久以前,加载静态程序意味着整个程序首先被加载到RAM中,然后,“解析共享库”步骤发生了。今天,只有按计划加载了实际执行的程序部分。因此,使用静态程序,您不需要解析DLL。使用DLL,您无需一次性加载它们。所以表现明智,他们应该是平等的。

Which leaves the "DLL Hell". Many programs on Windows bring all DLLs they need and they write them into the Windows directory. The net effect is that the last installed programs works and everything else might be broken. But there is a simple workaround: Install the DLLs into the same directory as the EXE. Windows will search the current directory first and then the various Windows paths. This way, you'll waste a bit of disk space but your program will work and, more importantly, you won't break anything else.

留下“DLL地狱”。 Windows上的许多程序带来了他们需要的所有DLL,并将它们写入Windows目录。实际效果是最后安装的程序可以运行,其他所有程序都可能被破坏。但是有一个简单的解决方法:将DLL安装到与EXE相同的目录中。 Windows将首先搜索当前目录,然后搜索各种Windows路径。这样,你会浪费一些磁盘空间,但你的程序会工作,更重要的是,你不会破坏任何其他东西。

One might argue that you shouldn't install DLLs which already exist (with the same version) in the Windows directory but then, you're again vulnerable to some bad app which overwrites the version you need with something that breaks your neck. The drawback is that you must distribute security fixes for your app yourself; you can't rely on Windows Update or similar things to secure your code. This is a tight spot; crackers are making lots of money from security issues and people will not like you when someone steals their banking data because you didn't issue security fixes soon enough.

有人可能会争辩说你不应该在Windows目录中安装已经存在的DLL(具有相同的版本),但是,你再次容易受到一些糟糕的应用程序的攻击,这些应用程序会覆盖你需要的版本,而这会破坏你的想法。缺点是您必须自己为应用分发安全修复程序;您不能依赖Windows Update或类似的东西来保护您的代码。这是一个紧张的地方;破解者从安全问题中赚了很多钱,当有人窃取他们的银行数据时,人们不会喜欢你,因为你没有尽快发布安全修复程序。

If you plan to support your application very tightly for many, say, 20 years, installing all DLLs in the program directory is for you. If not, then write code which checks that suitable versions of all DLLs are installed and tell the user about it, so they know why your app suddenly starts to crash.

如果您打算为许多人(例如20年)非常紧密地支持您的应用程序,那么在程序目录中安装所有DLL都是适合您的。如果没有,那么编写代码来检查所有DLL的合适版本是否已安装并告诉用户它,以便他们知道你的应用程序突然崩溃的原因。

#8


Yes, see this text :

是的,看到这个文字:

Dynamic linking has the following advantages:
Saves memory and reduces swapping. Many processes can use a single DLL simultaneously, sharing a single copy of the DLL in memory. In contrast, Windows must load a copy of the library code into memory for each application that is built with a static link library.
Saves disk space. Many applications can share a single copy of the DLL on disk. In contrast, each application built with a static link library has the library code linked into its executable image as a separate copy.
Upgrades to the DLL are easier. When the functions in a DLL change, the applications that use them do not need to be recompiled or relinked as long as the function arguments and return values do not change. In contrast, statically linked object code requires that the application be relinked when the functions change.
Provides after-market support. For example, a display driver DLL can be modified to support a display that was not available when the application was shipped.
Supports multilanguage programs. Programs written in different programming languages can call the same DLL function as long as the programs follow the function's calling convention. The programs and the DLL function must be compatible in the following ways: the order in which the function expects its arguments to be pushed onto the stack, whether the function or the application is responsible for cleaning up the stack, and whether any arguments are passed in registers.
Provides a mechanism to extend the MFC library classes. You can derive classes from the existing MFC classes and place them in an MFC extension DLL for use by MFC applications.
Eases the creation of international versions. By placing resources in a DLL, it is much easier to create international versions of an application. You can place the strings for each language version of your application in a separate resource DLL and have the different language versions load the appropriate resources.
A potential disadvantage to using DLLs is that the application is not self-contained; it depends on the existence of a separate DLL module.

动态链接具有以下优点:节省内存并减少交换。许多进程可以同时使用单个DLL,在内存*享DLL的单个副本。相反,Windows必须将库代码的副本加载到内存中,以用于使用静态链接库构建的每个应用程序。节省磁盘空间。许多应用程序可以在磁盘上共享DLL的单个副本。相反,使用静态链接库构建的每个应用程序都将库代码链接到其可执行映像中作为单独的副本。升级到DLL更容易。当DLL中的函数发生更改时,只要函数参数和返回值不发生更改,就不需要重新编译或重新链接使用它们的应用程序。相反,静态链接的目标代码要求在函数更改时重新链接应用程序。提供售后支持。例如,可以修改显示驱动程序DLL以支持应用程序发布时不可用的显示。支持多语言程序。只要程序遵循函数的调用约定,用不同编程语言编写的程序就可以调用相同的DLL函数。程序和DLL函数必须以下列方式兼容:函数将其参数推送到堆栈的顺序,函数或应用程序是否负责清理堆栈,以及是否传递任何参数在寄存器中。提供扩展MFC库类的机制。您可以从现有MFC类派生类,并将它们放在MFC扩展DLL中以供MFC应用程序使用。轻松创建国际版本。通过在DLL中放置资源,可以更轻松地创建应用程序的国际版本。您可以将应用程序的每个语言版本的字符串放在单独的资源DLL中,并使用不同的语言版本加载适当的资源。使用DLL的一个潜在缺点是应用程序不是自包含的;它取决于是否存在单独的DLL模块。

#9


From my point of view an shared component has some advantages that are somtimes realized as disadvantages.

从我的观点来看,共享组件具有一些优点,有时会被视为缺点。

  • shared component defines interfaces in your process. So you are forced to decide which components/interfaces are visible outside and which are hidden. This automatically defines which interface has to be stable and which does not have to be stable and can be refactored without affecting any code outside the component..
  • 共享组件定义进程中的接口。因此,您不得不决定哪些组件/接口在外部可见,哪些组件/接口是隐藏的。这会自动定义哪个接口必须稳定,哪个接口不必稳定,并且可以重构而不会影响组件外部的任何代码。

  • Memory administration in case of C++ and Windows must be well thought. So normally you should not handle memory outside of an dll that isn't freed in the same dll. If you do so your component may fail if: different runtimes or compiler version are used.
  • 必须仔细考虑C ++和Windows的内存管理。所以通常你不应该处理在同一个dll中没有释放的dll之外的内存。如果这样做,则在以下情况下组件可能会失败:使用不同的运行时或编译器版本。

So I think that using shared coponents will help the software to get better organized.

所以我认为使用共享的coponents将有助于软件更好地组织。

#1


MacOS X, like other flavours of Unix, use shared libraries, which are just another form of DLL.

与其他Unix版本一样,MacOS X使用共享库,这只是DLL的另一种形式。

And yes both are advantageous as the DLL or shared library code can be shared between multiple processes. It does this by the OS loading the DLL or shared library and mapping it into the virtual address space of the processes that use it.

并且两者都是有利的,因为DLL或共享库代码可以在多个进程之间共享。它通过操作系统加载DLL或共享库并将其映射到使用它的进程的虚拟地址空间来完成此操作。

#2


On Windows, you have to use dynamically-loaded libraries because GDI and USER libraries are avaliable as a DLL only. You can't link either of those in or talk to them using a protocol that doesn't involve dynamic loading.

在Windows上,您必须使用动态加载的库,因为GDI和USER库只能作为DLL使用。您无法使用不涉及动态加载的协议链接其中任何一个或与它们通信。

On other OSes, you want to use dynamic loading anyway for complex apps, otherwise your binary would bloat for no good reason, and it increases the probably that your app would be incompatible with the system in the long run (However, in short run static linking can somewhat shield you from tiny breaking changes in libraries). And you can't link in proprietary libraries on OSes which rely on them.

在其他操作系统上,您希望无论如何都要为复杂的应用程序使用动态加载,否则您的二进制文件将无缘无故地膨胀,并且它会增加您的应用程序从长远来看与系统不兼容的可能性(但是,在短期内运行静态)链接可以在一定程度上保护您免受库中微小的重大变化)。并且您无法在依赖它们的操作系统上链接专有库。

#3


Windows still use DLLs and Mac programs seem to not use DLL at all. Are they benefits or disadvantages of using either technique?

Windows仍然使用DLL和Mac程序似乎根本不使用DLL。它们是使用这两种技术的好处还是缺点?

Any kind of modularization is good since it makes updating the software easier, i.e. you do not have to update the whole program binary if a bug is fixed in the program. If the bug appears in some dll, only the dll needs to be updated.

任何类型的模块化都是好的,因为它使软件更新更容易,即如果程序中修复了错误,则不必更新整个程序二进制文件。如果错误出现在某个DLL中,则只需要更新dll。

The only downside with it imo, is that you introduce another complexity into the development of the program, e.g. if a dll is a c or c++ dll, different calling conventions etc.

imo唯一的缺点就是你在程序的开发中引入了另一个复杂性,例如:如果一个DLL是c或c ++ dll,不同的调用约定等。

If a program installation includes all the DLL it requires, will it be the same as statically linking all the libraries?

如果程序安装包含它需要的所有DLL,它是否与静态链接所有库相同?

More or less yes. Depends on if you are calling functions in a dll which you assume static linkage with. The dll could just as well be a "free standing" dynamic library, that you only can access via LoadLibrary() and GetProcAddress() etc.

或多或少是的。取决于你是否在一个你假设静态链接的dll中调用函数。 dll也可以是一个“独立”动态库,只能通过LoadLibrary()和GetProcAddress()等访问。

#4


One big advantage of shared libraries (DLLs on Windows or .so on Unix) is that you can rebuild the library and its consumers separately while with static libraries you have to rebuild the library and then relink all the consumers which is very slow on Unix systems and not very fast on Windows.

共享库(Windows上的DLL或Unix上的.so)的一大优点是,您可以单独重建库及其使用者,而使用静态库则必须重建库,然后重新链接所有在Unix系统上非常慢的使用者在Windows上并不是很快。

#5


MacOS software uses "dll's" as well, they are just named differently (shared libraries).
Dll's make sense if you have code you want to reuse in different components of your software. Mostly this makes sense in big software projects.
Static linking makes sense for small single-component applications, when there is no need for code reuse. It simplifies distribution since your component has no external dependencies.

MacOS软件也使用“dll”,它们的命名方式不同(共享库)。如果您想要在软件的不同组件中重用代码,那么Dll是有意义的。大多数情况下,这在大型软件项目中都很有用当不需要代码重用时,静态链接对于小型单组件应用程序很有意义。它简化了分发,因为您的组件没有外部依赖性。

#6


Besides memory/disk space usage, another important advantage of using shared libraries is that updates to the library will be automatically picked up by all programs on the system which use the library.

除了内存/磁盘空间使用之外,使用共享库的另一个重要优点是,对使用该库的系统上的所有程序将自动获取对库的更新。

When there was a security vulnerability in the InfoZIP ZIP libraries, an update to the DLL/.so automatically made all software safe which used these. Software that was linked statically had to be recompiled.

当InfoZIP ZIP库中存在安全漏洞时,对DLL / .so的更新会自动使所有使用这些软件的软件都安全。静态链接的软件必须重新编译。

#7


Windows still use DLLs and Mac programs seem to not use DLL at all. Are they benefits or disadvantages of using either technique?

Windows仍然使用DLL和Mac程序似乎根本不使用DLL。它们是使用这两种技术的好处还是缺点?

Both use shared libraries, they just use a different name.

两者都使用共享库,它们只使用不同的名称。

If a program installation includes all the DLL it requires so that it will work 100% well, will it be the same as statically linking all the libraries?

如果程序安装包含它需要的所有DLL,以便它可以100%正常工作,它是否与静态链接所有库相同?

Somewhat. When you statically link libraries to a program, you will get a single, very big file, with DLLs, you will have many files.

有些。当您将库静态链接到程序时,您将获得一个带有DLL的单个非常大的文件,您将拥有许多文件。

The statically linked file won't need the "resolve shared libraries" step (which happens while the program loads). A long time ago, loading a static program meant that the whole program was first loaded into RAM and then, the "resolve shared libraries" step happened. Today, only the parts of the program, which are actually executed, are loaded on demand. So with a static program, you don't need to resolve the DLLs. With DLLs, you don't need to load them all at once. So performance wise, they should be on par.

静态链接文件不需要“解析共享库”步骤(在程序加载时会发生)。很久以前,加载静态程序意味着整个程序首先被加载到RAM中,然后,“解析共享库”步骤发生了。今天,只有按计划加载了实际执行的程序部分。因此,使用静态程序,您不需要解析DLL。使用DLL,您无需一次性加载它们。所以表现明智,他们应该是平等的。

Which leaves the "DLL Hell". Many programs on Windows bring all DLLs they need and they write them into the Windows directory. The net effect is that the last installed programs works and everything else might be broken. But there is a simple workaround: Install the DLLs into the same directory as the EXE. Windows will search the current directory first and then the various Windows paths. This way, you'll waste a bit of disk space but your program will work and, more importantly, you won't break anything else.

留下“DLL地狱”。 Windows上的许多程序带来了他们需要的所有DLL,并将它们写入Windows目录。实际效果是最后安装的程序可以运行,其他所有程序都可能被破坏。但是有一个简单的解决方法:将DLL安装到与EXE相同的目录中。 Windows将首先搜索当前目录,然后搜索各种Windows路径。这样,你会浪费一些磁盘空间,但你的程序会工作,更重要的是,你不会破坏任何其他东西。

One might argue that you shouldn't install DLLs which already exist (with the same version) in the Windows directory but then, you're again vulnerable to some bad app which overwrites the version you need with something that breaks your neck. The drawback is that you must distribute security fixes for your app yourself; you can't rely on Windows Update or similar things to secure your code. This is a tight spot; crackers are making lots of money from security issues and people will not like you when someone steals their banking data because you didn't issue security fixes soon enough.

有人可能会争辩说你不应该在Windows目录中安装已经存在的DLL(具有相同的版本),但是,你再次容易受到一些糟糕的应用程序的攻击,这些应用程序会覆盖你需要的版本,而这会破坏你的想法。缺点是您必须自己为应用分发安全修复程序;您不能依赖Windows Update或类似的东西来保护您的代码。这是一个紧张的地方;破解者从安全问题中赚了很多钱,当有人窃取他们的银行数据时,人们不会喜欢你,因为你没有尽快发布安全修复程序。

If you plan to support your application very tightly for many, say, 20 years, installing all DLLs in the program directory is for you. If not, then write code which checks that suitable versions of all DLLs are installed and tell the user about it, so they know why your app suddenly starts to crash.

如果您打算为许多人(例如20年)非常紧密地支持您的应用程序,那么在程序目录中安装所有DLL都是适合您的。如果没有,那么编写代码来检查所有DLL的合适版本是否已安装并告诉用户它,以便他们知道你的应用程序突然崩溃的原因。

#8


Yes, see this text :

是的,看到这个文字:

Dynamic linking has the following advantages:
Saves memory and reduces swapping. Many processes can use a single DLL simultaneously, sharing a single copy of the DLL in memory. In contrast, Windows must load a copy of the library code into memory for each application that is built with a static link library.
Saves disk space. Many applications can share a single copy of the DLL on disk. In contrast, each application built with a static link library has the library code linked into its executable image as a separate copy.
Upgrades to the DLL are easier. When the functions in a DLL change, the applications that use them do not need to be recompiled or relinked as long as the function arguments and return values do not change. In contrast, statically linked object code requires that the application be relinked when the functions change.
Provides after-market support. For example, a display driver DLL can be modified to support a display that was not available when the application was shipped.
Supports multilanguage programs. Programs written in different programming languages can call the same DLL function as long as the programs follow the function's calling convention. The programs and the DLL function must be compatible in the following ways: the order in which the function expects its arguments to be pushed onto the stack, whether the function or the application is responsible for cleaning up the stack, and whether any arguments are passed in registers.
Provides a mechanism to extend the MFC library classes. You can derive classes from the existing MFC classes and place them in an MFC extension DLL for use by MFC applications.
Eases the creation of international versions. By placing resources in a DLL, it is much easier to create international versions of an application. You can place the strings for each language version of your application in a separate resource DLL and have the different language versions load the appropriate resources.
A potential disadvantage to using DLLs is that the application is not self-contained; it depends on the existence of a separate DLL module.

动态链接具有以下优点:节省内存并减少交换。许多进程可以同时使用单个DLL,在内存*享DLL的单个副本。相反,Windows必须将库代码的副本加载到内存中,以用于使用静态链接库构建的每个应用程序。节省磁盘空间。许多应用程序可以在磁盘上共享DLL的单个副本。相反,使用静态链接库构建的每个应用程序都将库代码链接到其可执行映像中作为单独的副本。升级到DLL更容易。当DLL中的函数发生更改时,只要函数参数和返回值不发生更改,就不需要重新编译或重新链接使用它们的应用程序。相反,静态链接的目标代码要求在函数更改时重新链接应用程序。提供售后支持。例如,可以修改显示驱动程序DLL以支持应用程序发布时不可用的显示。支持多语言程序。只要程序遵循函数的调用约定,用不同编程语言编写的程序就可以调用相同的DLL函数。程序和DLL函数必须以下列方式兼容:函数将其参数推送到堆栈的顺序,函数或应用程序是否负责清理堆栈,以及是否传递任何参数在寄存器中。提供扩展MFC库类的机制。您可以从现有MFC类派生类,并将它们放在MFC扩展DLL中以供MFC应用程序使用。轻松创建国际版本。通过在DLL中放置资源,可以更轻松地创建应用程序的国际版本。您可以将应用程序的每个语言版本的字符串放在单独的资源DLL中,并使用不同的语言版本加载适当的资源。使用DLL的一个潜在缺点是应用程序不是自包含的;它取决于是否存在单独的DLL模块。

#9


From my point of view an shared component has some advantages that are somtimes realized as disadvantages.

从我的观点来看,共享组件具有一些优点,有时会被视为缺点。

  • shared component defines interfaces in your process. So you are forced to decide which components/interfaces are visible outside and which are hidden. This automatically defines which interface has to be stable and which does not have to be stable and can be refactored without affecting any code outside the component..
  • 共享组件定义进程中的接口。因此,您不得不决定哪些组件/接口在外部可见,哪些组件/接口是隐藏的。这会自动定义哪个接口必须稳定,哪个接口不必稳定,并且可以重构而不会影响组件外部的任何代码。

  • Memory administration in case of C++ and Windows must be well thought. So normally you should not handle memory outside of an dll that isn't freed in the same dll. If you do so your component may fail if: different runtimes or compiler version are used.
  • 必须仔细考虑C ++和Windows的内存管理。所以通常你不应该处理在同一个dll中没有释放的dll之外的内存。如果这样做,则在以下情况下组件可能会失败:使用不同的运行时或编译器版本。

So I think that using shared coponents will help the software to get better organized.

所以我认为使用共享的coponents将有助于软件更好地组织。