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

二次信任 提交于 2019-12-05 07:49:28

I had a very similar problem using MingW inside XP.

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.

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) {}

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.

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 !

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%

and now everything runs fine !


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

Cheers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!