无法找到过程入口点__gxx_personality_v0

Nik*_*las 30 c++ qt mingw codeblocks irrlicht

编者注:类似于"程序错误点_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_无法在动态链接库中找到libstdc++-6.dll"的错误消息具有相同的原因,并且适用相同的解决方案.


如果我想在Windows中运行我的Irrlicht C++控制台应用程序,我会不断收到此错误:

the procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll

我正在使用CodeBlocks v12.11与MinGW和Irrlicht v1.8引擎.我正确设置了它.在我的电脑上还有一个安装了MinGW的Qt.是否可能存在冲突?

这是源代码:

#include <irrlicht.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

int main() {
    IrrlichtDevice *device = createDevice( video::EDT_OPENGL);

    if (!device)
        return 1;

    IVideoDriver* driver = device->getVideoDriver();
    ISceneManager* smgr = device->getSceneManager();
    IGUIEnvironment* guienv = device->getGUIEnvironment();

    guienv->addStaticText(L"Hello World", core::recti(10, 10, 100, 30));
    device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");

    while(device->run()) {
        driver->beginScene(true, true, SColor(250, 190, 1, 2));
        smgr->drawAll();
        guienv->drawAll();
        driver->endScene();
    }

    device->drop();
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

我将编译器配置为C:\CodeBlocks\MinGW.每个文件(设置中显示的一些文件)都位于下面bin,除了make.exe.这是正常的吗?

自动检测按钮也会显示上面的路径.

小智 55

我也有这个问题.这为我修好了:

  1. 转到MinGW文件夹(应为C:\ MinGW)
  2. 打开bin文件夹.
  3. 应该有一个名为libstdc ++ - 6.dll的文件
  4. 将其复制到与可执行文件相同的目录中.

这应该工作......

  • 伟大的答案,为我节省了大量的能量 (3认同)

Dev*_*lus 15

之所以出现这种情况的原因是,因为可以有一个libstdc++-6.dll在同样WINDOWS\System32的目录(或在一些其他地方,它可以通过PATH中找到).特别是当你使用不同版本的MingW时.因此解决方案是以PATH这样的方式更改环境变量,使您的MingW\bin目录位于Windows系统目录之前,将现有版本替换为较新版本或将dll复制到exectuable文件夹.