2014-11-11 11:54:43 -0600 | commented question | Compiling 2.4.10 with Mingw 4.8 fails in ts_func.cpp A workaround: In CMake turn off the following BUILD variables: BUILD_PERF_TESS BUILD_TESTS BUILD_opencv_apps And the remaining default opencv functionality will compile with mingw4.8.2 |
2014-11-10 13:06:21 -0600 | asked a question | Compiling 2.4.10 with Mingw 4.8 fails in ts_func.cpp This is my first time attempting to compile OpenCV 2.4.10 or 2.4.9 using MinGW 4.8.2 from Qt 5.3 and CMake 3.1.0 under Windows 7 Professional 64 bit. It fails with a linker error in ts_func.cpp (reproduced in full below). I am assuming it would compile without my needing to edit any source or make files and I have made a mistake somewhere. I would appreciate it if someone who has successfully compiled 2.4.10 with MinGW to verify I am doing this correctly and offer some advice on how to get a successful compile. Qt was installed as binaries and is able to create a working Hello World app. MinGW was added to the path. I installed the OpenCV sources via the windows installer. I installed CMake using the defaults. I started CMake and selected "specify compilers". I pointed them to the MinGW bin directory with gcc.exe and g++.exe. I selected the OpenCV source directory and a new OpenCV_bin directory for the output. I pressed the "Configure" button and had a number of red lines appear on the CMake GUI. I changed CMAKE_BUILD_TYPE to Release. I pressed the "configure" button and the red lines turned to white. I pressed the "generate" button. I opened a cmd.exe window. I changed to the opencv_bin directory where CMake was to output. I entered >mingw32-make and compilation started. Here is the error output: t_rand.cpp.obj
cc1plus.exe: warning: C:/develop/opencv2410/opencv_bin/modules/core/test_precomp
.hpp.gch/opencv_test_core_Debug.gch: not used because C:\develop\opencv2410\opencv_bin>mingw32-make |