News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How to make Code::Blocks use DW2 exception handling?

Started by Mowgli, October 03, 2013, 08:38:59 PM

Previous topic - Next topic

Mowgli

I am new to Code::Blocks, and I need to use it with OpenCV on a Windows XP SP3 computer. I have faced the following problem:

when I try to run any application that includes OpenCV, I immediately get the following error message:


Cannot find entry point of procedure __gxx_personality_v0 in dynamically linked library libstdc++-6.dll


As people say here: http://answers.opencv.org/question/3740/opencv-243-mingw-cannot-run-program/ -- this problem is probably caused by Code::Blocks using SJLJ exception handling method, while OpenCV supports only DW2. I can see that in the /bin/ folder of Code::Blocks, the *.dll files for both DW2 and SJLJ are present. How can I force Code::Blocks to use DW2 instead?

Thank you in advance.

thomas

What types of exceptions your program uses depends only on the compiler, Code::Blocks has nothing to do with it.

The TDM compiler suite has a DW2 variant which works reliably, to name one example. Though of course you could just rebuild OpenCV using your compiler instead, too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Biplab

Quote from: thomas on October 04, 2013, 12:56:33 PM
What types of exceptions your program uses depends only on the compiler, Code::Blocks has nothing to do with it.

The TDM compiler suite has a DW2 variant which works reliably, to name one example. Though of course you could just rebuild OpenCV using your compiler instead, too.

@Mowgli,

I'm elaborating Thomas' message. You can either
1) Download(http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.7%20series/4.7.1-tdm-1%20DW2/), install and use TDM compiler dw2 version, or
2) Recompile OpenCV with compiler that ships with Code::Blocks 12.11.
Be a part of the solution, not a part of the problem.