Cant build libs on windows 7 x64 (Bug #2466)
Description
hello
i have been trying to make the libs for OpenCV in one week now and cant get it to work.
i use:
Windows 7 X64
mingw-get-inst-20120426 (Latest minigw installer)
Cmake 2.8.9
and i also use the latest qt IDE
so what i am doing:
1. I download OpenCV 2.4.2 from sourceforge for windows.
2. I extract it to c:\ (it will be in c:\OpenCV)
3. I start Cmake GUI and set c:\OpenCV as source, and make a folder for the binaries (OpenCVbin) and select it as the bin output
4. I press the configure button and select the MinGW Makefiles option and using the native copmpiler option.
5. I search for the qt option in the search bar and select it.
6. I press the configure button again and all the red lines are gone. then i press the generate button.
7. I start the CMD with admin rights / privileges and go to the c:\OpenCVbin.
8. I Write the comand mingw32-make, and it begin to build the libs,
now is the problems, when i come to 29% it will chrash and giv this error message:
CMakeFiles\opencv_highgui.dir/objects.a(qrc_window_QT.cxx.obj):qrc_window_QT.cxx :(.text$_Z27qCleanupResources_window_QTv+0x24): undefined reference to `_imp___Z 23qUnregisterResourceDataiPKhS0_S0_' collect2: ld returnerade avslutningsstatus 1 mingw32-make[2]: *** [bin/libopencv_highgui242.dll] Error 1 mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 mingw32-make: *** [all] Error 2
I have followed so many guides and tutorials on the net to get it to work but not a thing always the same problem.
i really hope that you guys can help me with this, because i really want to use the OpenCV libs for my applications
best regards
Kaj Sanfridsson
Associated revisions
Merge pull request #2466 from ilya-lavrenov:tapi_transpose_3cn
History
Updated by Kaj Sanfridsson over 12 years ago
the comand line:
collect2: ld returnerade avslutningsstatus 1
have some swedish words in it i think it should be like this in english
collect2: ld returned ending status 1
Updated by Mohammed Manna over 12 years ago
You are not supposed to use the native compiler option in CMake. Do this:
1) Install MinGW and add the bin folder to your PATH.
2) Don't select native compiler option. Manually select a compiler location. Select g++ for C++ compiler and gcc for C compiler. (Sorry I cannot remember the exact option name, should be the second one from the top).
3) Do your configuration and generation again! It should work.
I only tried this 2-3 days ago with all the latest releases. It works fine! Although I tried it with CodeBlocks IDE, Visual Studio should also work.
Updated by Andrey Kamaev over 12 years ago
- Target version changed from 2.4.3 to 2.4.3-rc
Updated by Evgeny Talanin over 12 years ago
Kaj, please try Mohammed Manna's solution. This should work. If problem still exist, please reopen the issue.
- Assignee set to Kaj Sanfridsson
- Priority changed from High to Normal
- Status changed from Open to Cancelled