编者注:类似于"程序错误点_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! - …Run Code Online (Sandbox Code Playgroud) 我正在尝试自学用 C++ 编程,并在安装了 g++ 的 Windows 上使用 Cygwin。一切都很顺利,直到我开始声明字符串变量。将字符串文字与 cout 一起使用不会引起任何问题,但是一旦我声明了一个字符串变量,程序将不再运行。
#include <iostream>
#include <string>
int main ()
{
std::string mystring = "Test";
std::cout << mystring;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
前面的代码编译没有问题,但运行时没有输出。GDB 为我提供了以下内容:
(gdb) run
Starting program: /cygdrive/c/Projects/CPP Test/string.exe
[New Thread 8416.0x2548]
[New Thread 8416.0x2510]
[New Thread 8416.0x1694]
[New Thread 8416.0x14f4]
[Thread 8416.0x1694 exited with code 3221225785]
[Thread 8416.0x14f4 exited with code 3221225785]
During startup program exited with code 0xc0000139.
Run Code Online (Sandbox Code Playgroud)
从我设法收集的信息来看,这是 DLL 的某种入口点问题,但我可能完全错了。
有谁知道我做错了什么或我配置错误以及如何解决它?