First time here? Check out the FAQ!

Ask Your Question
0

Building OpenCV from git on CygWin

asked Mar 11 '13

MrOzBarry gravatar image

updated Mar 12 '13

Here is my build log:

[ 14%] Building CXX object
modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o
cd /home/Cineclick/opencv/build/modules/core && /usr/bin/c++.exe -Dopencv_core_EXPORTS -DHAVE_CVCONFIG_H -DHAVE_QT -DHAVE_QT_OPENGL -DCVAPI_EXPORTS -W -Wall -Wformat -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -march=i686 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG  -DNDEBUG -I/home/Cineclick/opencv/modules/core/test
-I/home/Cineclick/opencv/modules/features2d/include
-I/home/Cineclick/opencv/modules/highgui/include
-I/home/Cineclick/opencv/modules/flann/include
-I/home/Cineclick/opencv/modules/imgproc/include
-I/home/Cineclick/opencv/modules/core/include
-I/home/Cineclick/opencv/modules/ts/include
-I/home/Cineclick/opencv/build/modules/core
-I/home/Cineclick/opencv/modules/core/src
-I/home/Cineclick/opencv/modules/gpu/include
-I/home/Cineclick/opencv/build    -o CMakeFiles/opencv_core.dir/src/algorithm.cpp.o
-c /home/Cineclick/opencv/modules/core/src/algorithm.cpp
In file included from
/home/Cineclick/opencv/modules/core/include/opencv2/core/core.hpp:4691,
                 from /home/Cineclick/opencv/modules/core/src/precomp.hpp:50,
                 from /home/Cineclick/opencv/modules/core/src/algorithm.cpp:43:
/home/Cineclick/opencv/modules/core/include/opencv2/core/operations.hpp:4024:
error: got 2 template parameters for `void cv::AlgorithmInfo::addParam(cv::Algorithm&, const char*, cv::Ptr<T>&, bool, cv::Ptr<T> (cv::Algorithm::*)(), void (cv::Algorithm::*)(const cv::Ptr<T>&), const std::string&)'
/home/Cineclick/opencv/modules/core/include/opencv2/core/operations.hpp:4024:
error:   but 1 required /home/Cineclick/opencv/modules/core/include/opencv2/core/operations.hpp:4033:
error: redefinition of `void cv::AlgorithmInfo::addParam(cv::Algorithm&, const char*, cv::Ptr<T>&, bool, cv::Ptr<T> (cv::Algorithm::*)(), void (cv::Algorithm::*)(const cv::Ptr<T>&), const std::string&)'
/home/Cineclick/opencv/modules/core/include/opencv2/core/operations.hpp:4024:
error: `void cv::AlgorithmInfo::addParam(cv::Algorithm&,
const char*, cv::Ptr<T>&, bool, cv::Ptr<T> (cv::Algorithm::*)(), void (cv::Algorithm::*)(const cv::Ptr<T>&), const std::string&)' previously
declared here modules/core/CMakeFiles/opencv_core.dir/build.make:60: recipe for target `modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o'
failed make[2]: ***
[modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o]
Error 1 make[2]: Leaving directory
`/home/Cineclick/opencv/build'
CMakeFiles/Makefile2:724: recipe for target `modules/core/CMakeFiles/opencv_core.dir/all' failed make[1]: ***
[modules/core/CMakeFiles/opencv_core.dir/all]
Error 2 make[1]: Leaving directory `/home/Cineclick/opencv/build'
Makefile:119: recipe for target `all'
failed make: *** [all] Error 2

Any ideas how to get this working?

Edit:

$ /usr/bin/i686-pc-mingw32-c++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/i686-pc-mingw32-c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-mingw32/4.5.2/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: /usr/src/packages/mingw-gcc/mingw-gcc-4.5.2-1/src/gcc-4.5.2/configure --srcdir=/usr/src/packages/mingw-gcc/mingw-gcc-4.5.2-1/src/gcc-4.5.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/mingw-gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-mingw32 --with-sysroot ...
(more)
Preview: (hide)

Comments

could you please add the mingw version ?

berak gravatar imageberak (Mar 11 '13)edit

Updated with my mingw32 compiler version.

MrOzBarry gravatar imageMrOzBarry (Mar 12 '13)edit

nice that you got it to compile.

what do you mean by "now it can't find my webcam" ?

is it a 'special' one, like Ximea ?

(if that's the case, you could rerun cmake-gui to set the missing options)

but for an ordinary, off-the-shelf device, you don't need to specify anything at compile time.

berak gravatar imageberak (Mar 12 '13)edit

It's just a regular usb webcam. I did some googling and it suggested that my usb webcam is not reachable through cygwin since it won't detect dshow or videoInput as valid options.

MrOzBarry gravatar imageMrOzBarry (Mar 12 '13)edit

ah, ok. so no dshow for mingw or cygwin, even. (yes, that videoInput.lib comes precompiled as a .lib file, so vs only) you could still try if the vfw capture works for you:

 int camid = 0;
 VideoCapture cap(CV_CAP_VFW + camid);

look at cvCreateCameraCapture(), modules/highgui/src/cap.cpp ~ L 113

berak gravatar imageberak (Mar 12 '13)edit

1 answer

Sort by » oldest newest most voted
0

answered Mar 11 '13

berak gravatar image

updated Mar 11 '13

ran into the same error lately, realized, that my codeblocks install was fairly old:

gcc version 3.4.5(mingw-vista special) (codeblocks 8.2, yes that IS old)

updating mingw helped, gcc version 4.5.2 (GCC) now, - no problem.

good luck!

(and thanks for your post, i was only trying that, to help someone else and got stuck in the same place. [more a vs guy here, you know, when in rome ..] well, you made me realize the problem ;)

Preview: (hide)

Comments

Well, I'm not using Code::Blocks, or an old version of mingw =/

MrOzBarry gravatar imageMrOzBarry (Mar 12 '13)edit

Question Tools

Stats

Asked: Mar 11 '13

Seen: 2,114 times

Last updated: Mar 12 '13