且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在动态链接库libstdc ++-6.dll中找不到过程入口点__gxx_personality_v0

更新时间:2023-10-23 10:42:04

libstdc ++-6.dll包含运行时环境.它是基本例程的实现,例如堆管理器或异常处理.

The libstdc++-6.dll contains the runtime environment. It is an implementation of fundamental routines, such as the heap manager or the exception handling.

这些基本例程几乎在每个程序中都使用.因此,将它们的副本放入每个程序将浪费内存.这就是为什么它们通常打包到共享库(DLL)中的原因.然后,程序在需要运行时的例程时可以请求DLL.

These fundamental routines are used in nearly every program. Thus, it would be a waste of memory to put a copy of them into every program. That is why they are usually packed into a shared library (DLL). The programs can then request the DLL when they need the routines of the runtime.

在您的情况下,libstdc ++-6.dll包含错误版本的运行时.有两种可能性:

In your case, the libstdc++-6.dll contains a wrong version of the runtime. There are two possibilities:

  • 找到包含正确版本的运行时的libstdc ++-6.dll,并将其复制到可执行文件的目录中.您可以通过运行nm libstdc++-6.dll | grep personality来确定DLL是否正确.如果__gxx_personality_v0显示在列表中,则您可能具有正确的DLL.
  • 将运行时环境的副本放入可执行文件中.您可以通过在链接器参数中添加-static-libgcc -static-libstdc++来完成此操作.
  • Find a libstdc++-6.dll that contains the correct version of the runtime and copy it into the directory of your executable. You can determine whether a DLL is the correct one by running nm libstdc++-6.dll | grep personality. If the __gxx_personality_v0 shows up in the list, then you probably have the correct DLL.
  • Put a copy of the runtime environment into the executable. You can do this by adding -static-libgcc -static-libstdc++ to your linker parameters.