OpenCV2.4 lib complied by mingw not working (Bug #1926)
Description
Hi all,
Thanks for read the message.
I don't know whether some one already solved the problem. I can use OpenCV2.4 lib compiled by VS on Windows smoothly(VS2010 and VS11), as well as work fine with OpenCV2.4 on Ubuntu(Eclipse + CDT).
But I can't use the OpenCV2.4 lib compiled by mingw on Windows. The program could build well. But When I run it, it just show me a grey
window and crashed immediately. (I also test different samples, all samples could work well on VS.)
First I think it is my IDE environment setting problem(Eclipse + CDT on Windows). As consequence, I check the setting, but nothing changed.
Then I set the OpenCV environment in Code::Block and Qt Creator, the program all get same problem. I also test it in different computers, the problem still happened.
Then I confirm my environment variable setting. It all seems correct.
Could anyone suggest me how to solve the problem? Thanks!
Best Regards!
Sun
Related issues
related to Bug #1668: crash using namedWindow | Cancelled | |||
related to Patch #1896: imshow crash | Cancelled | 2012-05-06 | ||
related to Bug #583: mingw32 SSE/SSE2 instabilities | Cancelled |
History
Updated by Sylvain Leroy almost 13 years ago
Same problem for me with mingw on windows (32 bits). There was the same issue with OpenCV 2.3.1 (https://code.ros.org/trac/opencv/ticket/1494, http://code.opencv.org/issues/1668)
Alexander Sun wrote:
Hi all,
Thanks for read the message.I don't know whether some one already solved the problem. I can use OpenCV2.4 lib compiled by VS on Windows smoothly(VS2010 and VS11), as well as work fine with OpenCV2.4 on Ubuntu(Eclipse + CDT).
But I can't use the OpenCV2.4 lib compiled by mingw on Windows. The program could build well. But When I run it, it just show me a grey
window and crashed immediately. (I also test different samples, all samples could work well on VS.)First I think it is my IDE environment setting problem(Eclipse + CDT on Windows). As consequence, I check the setting, but nothing changed.
Then I set the OpenCV environment in Code::Block and Qt Creator, the program all get same problem. I also test it in different computers, the problem still happened.Then I confirm my environment variable setting. It all seems correct.
Could anyone suggest me how to solve the problem? Thanks!
Best Regards!
Sun
Updated by Alexander Sun almost 13 years ago
Thanks for your reply, but it's not just namedWindow or imshow's problem. Even I use imwrite, it get a empty image.
Sylvain Leroy wrote:
Same problem for me with mingw on windows (32 bits). There was the same issue with OpenCV 2.3.1 (https://code.ros.org/trac/opencv/ticket/1494, http://code.opencv.org/issues/1668)
Alexander Sun wrote:
Hi all,
Thanks for read the message.I don't know whether some one already solved the problem. I can use OpenCV2.4 lib compiled by VS on Windows smoothly(VS2010 and VS11), as well as work fine with OpenCV2.4 on Ubuntu(Eclipse + CDT).
But I can't use the OpenCV2.4 lib compiled by mingw on Windows. The program could build well. But When I run it, it just show me a grey
window and crashed immediately. (I also test different samples, all samples could work well on VS.)First I think it is my IDE environment setting problem(Eclipse + CDT on Windows). As consequence, I check the setting, but nothing changed.
Then I set the OpenCV environment in Code::Block and Qt Creator, the program all get same problem. I also test it in different computers, the problem still happened.Then I confirm my environment variable setting. It all seems correct.
Could anyone suggest me how to solve the problem? Thanks!
Best Regards!
Sun
Updated by Alexander Sun almost 13 years ago
highgui's problem... when I don't use highgui, all work fine.
Updated by Andrey Kamaev almost 13 years ago
Guys, can you post more details about you build environments? Especially version of mingw including download URL if you have.
Also could you verify if OpenCV trunk r8346 still has this problem?
Updated by Sylvain Leroy almost 13 years ago
I have just downloaded the 8346 revision and I have this error when using cmake gui :
CMake Error at CMakeLists.txt:282 (include):
A logical block opening on the line
C:/OpenCV2.4.0_trunk8346_MinGW/cmake/OpenCVCompilerOptions.cmake:1 (if)
is not closed.
And to answer your question, I have gcc 4.6.2 and I downloaded mingw here : http://sourceforge.net/projects/mingw/files/
Updated by Andrey Kamaev almost 13 years ago
Sorry, fixed in r8347. Please try it.
Updated by Sylvain Leroy almost 13 years ago
I have compiled r8347 but I still can't run contours2 or drawing samples. These programs crash directly.
Here is my configuration :
General configuration for OpenCV 2.4.0 ===================================== Platform: Host: Windows 6.1 x86 CMake: 2.8.8 CMake generator: MinGW Makefiles CMake build tool: C:/MinGW/bin/mingw32-make.exe Configuration: Release C/C++: Built as dynamic libs?: YES C++ Compiler: C:/MinGW/bin/g++.exe (ver 4.6.2) C++ flags (Release): -Wall -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG -DNDEBUG C++ flags (Debug): -Wall -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3 C Compiler: C:/MinGW/bin/gcc.exe C flags (Release): -Wall -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -O3 -DNDEBUG -DNDEBUG C flags (Debug): -Wall -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3 Linker flags (Release): Linker flags (Debug): OpenCV modules: To be built: calib3d contrib core features2d flann gpu highgui imgproc legacy ml nonfree objdetect photo stitching ts video videostab Disabled by user: world Disabled by dependency: - Unavailable: androidcamera java python GUI: Win32 UI: YES OpenGL support: NO Media I/O: ZLib: build (ver 1.2.6) JPEG: build (ver 62) PNG: build (ver 1.5.9) TIFF: build (ver 42) JPEG 2000: build (ver 1.900.1) OpenEXR: NO OpenNI: NO OpenNI PrimeSensor Modules: NO XIMEA: NO Video I/O: DirectShow FFMPEG: YES (prebuilt binaries) codec: YES (ver 53.61.100) format: YES (ver 53.32.100) util: YES (ver 51.35.100) swscale: YES (ver 2.1.100) gentoo-style: YES Other third-party libraries: Use IPP: NO Use TBB: NO Use Cuda: NO Use Eigen: NO Use Clp: NO Python: Interpreter: NO Documentation: Build Documentation: NO Sphinx: NO PdfLaTeX compiler: C:/Program Files/MiKTeX 2.9/miktex/bin/pdflatex.exe Tests and samples: Tests: YES Performance tests: YES Examples: YES Install path: C:/OpenCV2.4.0_trunk8347_MinGW/build/install cvconfig.h is in: C:/OpenCV2.4.0_trunk8347_MinGW/build -----------------------------------------------------------------
Updated by Andrey Kamaev almost 13 years ago
I've tried several versions of MinGW including 4.6.2 from sourceforge but all them wok fine on my PC.
Those who have problems with MinGW 4.5 or newer can you check if adding -mstackrealign
to the OpenCV build options solves the issue?
- Target version deleted (
2.4.1) - Category set to build/install
Updated by Andrey Kamaev almost 13 years ago
The fix for #1932 should fix the problems. Please, verify.
This ticket is closed as duplicate.
- Status changed from Open to Cancelled
- Target version set to 2.4.1
- Assignee set to Andrey Kamaev
Updated by Sylvain Leroy almost 13 years ago
I have downloaded r8383 and it still crashes with MinGW. I can't run the samples.
Updated by Andrey Kamaev almost 13 years ago
Could you try r8386?
Updated by Sylvain Leroy almost 13 years ago
Same problem with r8386
Updated by Andrey Kamaev almost 13 years ago
- Status changed from Cancelled to Done
- Target version deleted (
2.4.1)
Updated by Andrey Kamaev almost 13 years ago
- Status changed from Done to Open
Updated by Sylvain Leroy almost 13 years ago
r8393 still crashes for me
Updated by Andrey Kamaev over 12 years ago
- Assignee deleted (
Andrey Kamaev)
Updated by Daniil Osokin about 11 years ago
It's been a long time since there is no activity in this topic. If problem is still existed, please, post here your experience, otherwise this ticket will be closed.
- Target version set to 2.4.9
- HW Platform set to x86
- Operating System set to Windows
- Affected version set to 2.4.0 - 2.4.7
Updated by Daniil Osokin about 11 years ago
- Status changed from Open to Cancelled