gpt4 book ai didi

linux - 包装器 cpp 文件中的 libfreenect cmake 错误

转载 作者:太空宇宙 更新时间:2023-11-04 10:02:30 25 4
gpt4 key购买 nike

我正在尝试在我的 ubuntu 16.04 系统和 libfreenect 库中安装 kinect 360,但遇到了 cmake 问题。我应该怎么做才能解决这个问题?非常感谢你们!

In file included from /home/evdo/Kinect/libfreenect/wrappers/cpp/cppview.cpp:27:0:
/home/evdo/Kinect/libfreenect/wrappers/cpp/libfreenect.hpp:182:8: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
std::unique_ptr<uint8_t[]> m_rgb_buffer;
^
/home/evdo/Kinect/libfreenect/wrappers/cpp/libfreenect.hpp: In member function ‘void Freenect::FreenectDevice::setVideoFormat(freenect_video_format, freenect_resolution)’:
/home/evdo/Kinect/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]);
^
wrappers/cpp/CMakeFiles/freenect-cppview.dir/build.make:62: recipe for target 'wrappers/cpp/CMakeFiles/freenect-cppview.dir/cppview.cpp.o' failed make[2]: *** [wrappers/cpp/CMakeFiles/freenect-cppview.dir/cppview.cpp.o] Error 1
CMakeFiles/Makefile2:810: recipe for target 'wrappers/cpp/CMakeFiles/freenect-cppview.dir/all' failed
make[1]: *** [wrappers/cpp/CMakeFiles/freenect-cppview.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

最佳答案

如下所示在CmakeLists.txt中添加一行代码。

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -std=c++11")

关于linux - 包装器 cpp 文件中的 libfreenect cmake 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55069696/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com