Ask Your Question
0

Building OpenCV from git on CygWin

asked 2013-03-11 15:58:57 -0600

MrOzBarry gravatar image

updated 2013-03-12 09:27:10 -0600

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)
edit retag flag offensive close merge delete

Comments

could you please add the mingw version ?

berak gravatar imageberak ( 2013-03-11 16:14:52 -0600 )edit

Updated with my mingw32 compiler version.

MrOzBarry gravatar imageMrOzBarry ( 2013-03-12 07:02:34 -0600 )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 ( 2013-03-12 09:42:18 -0600 )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 ( 2013-03-12 13:15:46 -0600 )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 ( 2013-03-12 13:36:48 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-11 16:18:39 -0600

berak gravatar image

updated 2013-03-11 16:34:26 -0600

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 ;)

edit flag offensive delete link more

Comments

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

MrOzBarry gravatar imageMrOzBarry ( 2013-03-12 07:04:09 -0600 )edit

Question Tools

Stats

Asked: 2013-03-11 15:58:57 -0600

Seen: 2,106 times

Last updated: Mar 12 '13