-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
I was not being able to compile the current branch of the repository due to errors related to std::unique_ptr definition not being found. The following errors appeared
In file included from /home/ubuntu/OpenNI2/libfreenect/wrappers/cpp/cppview.cpp:27:0:
/home/ubuntu/OpenNI2/libfreenect/wrappers/cpp/libfreenect.hpp:182:3: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
std::unique_ptr<uint8_t[]> m_rgb_buffer;
^
/home/ubuntu/OpenNI2/libfreenect/wrappers/cpp/libfreenect.hpp: In member function ‘void Freenect::FreenectDevice::setVideoFormat(freenect_video_format, freenect_resolution)’:
/home/ubuntu/OpenNI2/libfreenect/wrappers/cpp/libfreenect.hpp:115:5: error: ‘m_rgb_buffer’ was not declared in this scope
m_rgb_buffer.reset(new uint8_t[mode.bytes]);
I solved the issue by adding the c++11 flag in CMakeLists line 117
set(CMAKE_CXX_FLAGS "${C_CXX_FLAGS_DEFAULT} ${CMAKE_CXX_FLAGS} --std=c++11")
Shouldn't this be changed in the repository? Other people already had this error (see #576) but they ended up only using older versions