Ask Your Question

Building OpenCV with C++11

asked 2013-02-22 11:08:11 -0500

emchristiansen gravatar image

I attempted to build OpenCV master with C++11, by passing "-std=c++11" as one of the CMAKE_CXX_FLAGS. I'm using g++ 4.7.2. The build failed with this error:

opencv/modules/softcascade/src/_random.hpp:70:13: error: ‘uniform_int’ in namespace ‘std’ does not name a type

Is this a bug, or is C++11 not supported?

edit retag flag offensive close merge delete


the softcascade is pretty new, some weeks old, i'd say it's a bug

berak gravatar imageberak ( 2013-02-22 11:48:01 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2013-02-22 11:57:24 -0500

Vincent Rabaud gravatar image

Yop, it seems that uniform_int from TR1 got renamed to uniform_int_distribution in C++11: C++11 uniform_int_distribution. Please fix and pull request Eric :)

edit flag offensive delete link more


emchristiansen gravatar imageemchristiansen ( 2013-02-22 15:32:29 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-02-22 11:08:11 -0500

Seen: 3,526 times

Last updated: Feb 22 '13