编译报错 error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
Closed this issue · 0 comments
wade@wade-MACHR-WX9:cmake-build-debug$ make
Scanning dependencies of target c100
[ 12%] Building CXX object CMakeFiles/c100.dir/src/main.cpp.o
In file included from /home/wade/learn/compiler/c100/src/main.cpp:2:
/home/wade/learn/compiler/c100/src/Lexer.h:69:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
69 | std::shared_ptr CurrentToken;
| ^~~~~~~~~~
/home/wade/learn/compiler/c100/src/Lexer.h:15:1: note: ‘std::shared_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
14 | #include <string_view>
+++ |+#include
15 |
make[2]: *** [CMakeFiles/c100.dir/build.make:63: CMakeFiles/c100.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/c100.dir/all] Error 2
make: *** [Makefile:84: all] Error 2