“在动态链接库libstdc -6.dll中找不到过程入口点_ZNSt8_detail15_List_node_base7_M_hookEPS0_." [英] "the procedure entry point _ZNSt8_detail15_List_node_base7_M_hookEPS0_ could not be located in the dynamic link library libstdc -6.dll."

查看:314
本文介绍了“在动态链接库libstdc -6.dll中找不到过程入口点_ZNSt8_detail15_List_node_base7_M_hookEPS0_."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个小问题.我有C ++代码,它链接到一些库.我以前有源代码的(原始)exe文件,并且可以在第一台机器上完美运行.第二台机器上,我在其中处理源代码,对其进行更改,等等.在第二台机器上,该源代码的构建工作正常,当我复制second.exe并尝试在第一台机器上运行它时,请花点时间它显示错误消息

have a small problem. I have c++ code, it's linking to some libraries. I have previously (original)exe from the source code and that runs perfectly on first machine. And there is second machine, where I work on the source code, change it, etc. On the second machine, the build of that source code works fine, bud when I copy the second.exe and try tu run it on the first machine it displays error message

过程入口点_ZNSt8_detail15_List_node_base7_M_hookEPS0_不在动态链接库libstdc ++-6.dll中."

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

一件事,second.exe被复制到与original.exe相同的文件夹中,因此它应该看到ddl,因为原始dll与original.exe处于同一文件夹中,不是吗? 它是用MinGW编译的,可以在NetBeans和项目属性中运行,有库添加(通过添加库文件),但是没有添加libstdc ++-6.dll. libstdc ++-6.dll在original.exe所在的文件夹中

One thing, second.exe is copied in the same folder as original.exe, so it should see the ddl 'cause the original dll is in the same folder as original.exe, shouldn't it? It's compiled with MinGW, working in NetBeans and in project properties, there are libraries add (via add library file) but the libstdc++-6.dll is not there added. libstdc++-6.dll is in the folder where original.exe

thx

推荐答案

在XP中使用MingW时,我遇到了一个非常相似的问题.

I had a very similar problem using MingW inside XP.

我使用mingW编译了一个12 klines的C ++项目.它在MSYS中运行良好,但是在调用本机cmd shell时失败,声称入口点 libstdc ++-6.dll中缺少Z_St8_detail15_and_so_on.

I have compiled a 12 klines C++ project using mingW; It runs fine within MSYS, but failed when called whithin a native cmd shell, claiming that the entry point Z_St8_detail15_and_so_on is missing inside libstdc++-6.dll.

相反,简单的以下程序同时在MSYS和cmd中运行:

Conversely, the simple following program ran in both MSYS and cmd :

#include <iostream>

using namespace std ;

class Hello {
  public:
  Hello() { cout << "Hello !" << endl ; }
} ;

Hello hello ;

int main (void) {}

必须针对libstdc ++(gcc -o hello hello.cpp -lstdc ++)进行编译,如果省略-lstdc ++,则编译当然会失败.因此,改名可能不是唯一的问题.

It had to be compiled against libstdc++ (gcc -o hello hello.cpp -lstdc++), and of course the compilation failed if -lstdc++ was omitted. So the name mangling was likely not to be the only issue.

我在资源管理器中搜索了libstdc ++-6.dll,发现系统上有两个:一个安装在migw32中,另一个是以前由拥有自己版本的程序安装的lib在其目录中.但是,它修改了PATH,以便首先找到它的库!

I searched for libstdc++-6.dll within the explorer, and I found out that there were two on my system : one that was installed within migw32, and another one that had been installed previously by a program who held its own version of the lib within its directories. But, it had modified the PATH so that its lib were found first !

我将Mingw所在的路径插入了当前shell内PATH的开头.像这样:

I inserted the path where Mingw stood at the beginning of the PATH inside the current shell. Smth like:

set PATH=C:\mingw\bin;D:\msys\1.0\local\bin;%PATH%

现在一切正常!

马丁,我无法在您的评论中写下内容,因此我编辑了我的信息: 你将是对的.在此处说明Windows如何查找DLL:

Martin, I can't write in your comments, so I edit my message : You are about to be right. How windows does look for the DLLs is explained right here:

http://msdn.microsoft. com/en-en/library/7d83bc18%28v = vs.80%29.aspx

欢呼

这篇关于“在动态链接库libstdc -6.dll中找不到过程入口点_ZNSt8_detail15_List_node_base7_M_hookEPS0_."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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