Ask Your Question

Revision history [back]

opencv_createsamples.exe entry point problem with XP

Hello everyone,

I'm currently on a project about pattern detection in video so we are curently using traincascade to get a Cascade classifier XML file. The project started on my computer (Windows 7 64 bits) so I compiled openCV using CMake with the WITH_TBB option set to true. I compiled everything in 32 bits (x86)

Works very well and used the apps very often with a lot of configuration without problem.

Then, another collegue gets into the project so I copied my whole directory of work with already compiled stuff(.exe of the opencv apps, dll, positive samples, etc) on his computer which is Windows XP 32 bits.

opencv_Traincascade.exe works very well on his computer but everytime he start opencv_createsmaples.exe with any parameters, he get this message:

The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll.

Does anyone has any idea what is causing that? Is there a configuration when I compile in Visual Studio 2010 that could fix this problem in XP? Or in the CMake? Do I need to recompile the .exe on each different machine that use it? (that would be insane!).

Thanks!

click to hide/show revision 2
add latest update in this saga

opencv_createsamples.exe entry point problem with XP

Hello everyone,

I'm currently on a project about pattern detection in video so we are curently using traincascade to get a Cascade classifier XML file. The project started on my computer (Windows 7 64 bits) so I compiled openCV using CMake with the WITH_TBB option set to true. I compiled everything in 32 bits (x86)

Works very well and used the apps very often with a lot of configuration without problem.

Then, another collegue gets into the project so I copied my whole directory of work with already compiled stuff(.exe of the opencv apps, dll, positive samples, etc) on his computer which is Windows XP 32 bits.

opencv_Traincascade.exe works very well on his computer but everytime he start opencv_createsmaples.exe with any parameters, he get this message:

The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll.

Does anyone has any idea what is causing that? Is there a configuration when I compile in Visual Studio 2010 that could fix this problem in XP? Or in the CMake? Do I need to recompile the .exe on each different machine that use it? (that would be insane!).

EDIT

I just compile OpenCV (2.4.3) on the Windows XP machine with TBB using Visual Studio 2010. Everything compile perfectly except that when we run the opencv_createsamples.exe, the same error occurs (see above). It only happens in Release mode, if we compile in debug, it works! So I'm starting to think that maybe it's a bug in the latest release. Is there some developer over here that can check this out? Since the error is only happening in debug, I can't debug the code to see where it fail and I don't know the code enough to know where critical section are use. Also, like I said before, the opencv_traincascade.exe is working perfectly. Any idea?

Thanks!

click to hide/show revision 3
add another edit with new test I've done and with picture to help understand

opencv_createsamples.exe entry point problem with XP

Hello everyone,

I'm currently on a project about pattern detection in video so we are curently using traincascade to get a Cascade classifier XML file. The project started on my computer (Windows 7 64 bits) so I compiled openCV using CMake with the WITH_TBB option set to true. I compiled everything in 32 bits (x86)

Works very well and used the apps very often with a lot of configuration without problem.

Then, another collegue gets into the project so I copied my whole directory of work with already compiled stuff(.exe of the opencv apps, dll, positive samples, etc) on his computer which is Windows XP 32 bits.

opencv_Traincascade.exe works very well on his computer but everytime he start opencv_createsmaples.exe with any parameters, he get this message:

The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll.

Does anyone has any idea what is causing that? Is there a configuration when I compile in Visual Studio 2010 that could fix this problem in XP? Or in the CMake? Do I need to recompile the .exe on each different machine that use it? (that would be insane!).

EDIT

I just compile OpenCV (2.4.3) on the Windows XP machine with TBB using Visual Studio 2010. Everything compile perfectly except that when we run the opencv_createsamples.exe, the same error occurs (see above). It only happens in Release mode, if we compile in debug, it works! So I'm starting to think that maybe it's a bug in the latest release. Is there some developer over here that can check this out? Since the error is only happening in debug, I can't debug the code to see where it fail and I don't know the code enough to know where critical section are use. Also, like I said before, the opencv_traincascade.exe is working perfectly. Any idea?

EDIT 2

After compiling without TBB and discovering that everything is working, we decided to validate if the problem is the TBB.dll itself or the usage of TBB by OpenCV. We just checked TBB.dll and TBB_debug.dll with "Dependancy Walker" and they are ok on their own (nothing in red, no call to InitializeCriticalSectionEx.dll). Seems the problem is the use of TBB by OpenCV. Here is the image of the "Dependency Walker" on the opencv_createsamplesd.exe (debug) and the opencv_createsample.exe (release) when compiled WITH_TBB in CMake. Hope it helps!

In debug, everything is ok Depends in debug

In release, problem! Depends in release

Thanks!