Issue1 std::shared_ptr问题
cmake build错误
- Error 如图1
1
error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
- Solution
- 添加
#include <memory>
; - CMakeLists.txt中添加:
set(CMAKE_CXX_STANDARD 11)
;
- 添加
cmake build错误
1 | error: ‘shared_ptr’ in namespace ‘std’ does not name a template type |
#include <memory>
;set(CMAKE_CXX_STANDARD 11)
;