Ask Your Question
1

opencv 2.4.5 compilation erros

asked 2013-04-16 08:46:40 -0600

nickq gravatar image

updated 2013-04-16 12:53:37 -0600

Hi Alll

I try compile the last opencv 2.4.5 in debug mode with the flags -D WITH_CUDA=OFF -D WITH_OPENCL=OFF

affter compile the [ 83%] get this errors

In file included / debug/src/OpenCV-2.4.5/modules/nonfree/src/precomp.hpp: 57:0,
                  from error: redefinition of 'class cv :: gpu :: SURF_GPU'
/ debug/include/opencv2/gpu/gpu.hpp: 1542:18: error: previous definition of 'class cv :: gpu :: SURF_GPU'
/ debug/src/OpenCV2.4.5/modules/nonfree/include/opencv2/nonfree/gpu.hpp: 134:18: error: redefinition of 'class cv :: gpu :: VIBE_GPU'
/ debug/include/opencv2/gpu/gpu.hpp: 2296:18: error: previous definition of 'class cv :: gpu :: VIBE_GPU'
cc1plus: warning: unrecognized command line option "-WNO-unnamed-type-template-args" [enabled by default]
cc1plus: warning: unrecognized command line option "-WNO-delete-non-virtual-dtor" [enabled by default]
cc1plus: warning: unrecognized command line option "-WNO-narrowing" [enabled by default]
make [3]: *** [modules / nonfree / CMakeFiles / opencv_nonfree_pch_dephelp.dir / opencv_nonfree_pch_dephelp.cxx.o] Error 1
make [2]: *** [modules / nonfree / CMakeFiles / opencv_nonfree_pch_dephelp.dir / all] Error 2

have some one any idea how fix it?

regards

edit retag flag offensive close merge delete

Comments

2

Please clean-up the build dir, run CMake and provide the full CMake output together with the full CMake invocation command line here for analysis.

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-04-17 03:02:07 -0600 )edit

1 answer

Sort by » oldest newest most voted
3

answered 2013-04-17 02:58:03 -0600

Vladislav Vinogradov gravatar image

Something wrong with your build system. It uses header files from different locations.

For example opencv2/nonfree/gpu.hpp is used from

/ debug/src/OpenCV2.4.5/modules/nonfree/include/opencv2/nonfree/gpu.hpp

but opencv2/gpu/gpu.hpp is used from

/ debug/include/opencv2/gpu/gpu.hpp

It must be used from

/ debug/src/OpenCV2.4.5/modules/gpu/include/opencv2/gpu/gpu.hpp
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-04-16 08:46:40 -0600

Seen: 1,935 times

Last updated: Apr 17 '13