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

2

3

I got that error when trying to run my opencv application. I´m using Windows7,CodeBlocks 12.11, opencv2.4.4 and MinGW compiler (the one that comes in CodeBlocks). It compiles and creates the executable but when i try to run it crashes with the procedure entry point error. I have added C:\programs\CodeBlocks\Mingw\bin to "PATH" variable and i know there is libstdc++-6.dll.

I don´t know what´s hapenning.

This is the simple code:

include <iostream>
include <opencv2/highgui/highgui.hpp>

using namespace std;
using namespace cv;

int main()
{
cout << "Hello world!" << endl;
namedWindow("window");
Mat image=imread("mustang.jpg",CV_LOAD_IMAGE_COLOR);
imshow("window",image);
waitKey(0);
return 0;
} 
Recrystallize answered 22/4, 2013 at 7:18 Comment(1)
Possible duplicate of the procedure entry point __gxx_personality_v0 could not be locatedBrita
V
3

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

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.

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

  • 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.
Voltage answered 14/10, 2015 at 13:56 Comment(0)
E
1

This question seems to have been answered several times here on stackoverflow. What is __gxx_personality_v0 for? as one of them

Elsieelsinore answered 20/7, 2013 at 7:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.