(1)Error:user/sh.c: In function ‘runcmd’
error: infinite recursion detected [-Werror=infinite-recursion]
原因: 未知
解决方案:
user/sh.c中,第57行,即void runcmd前加上
__attribute__((noreturn))
(2)Error:无法打开源文件xxx.h
原因: 头文件未包含进来。
解决方案: 根目录下按Ctrl+Shift+P后输入C/C++:Edit Configurations,.vscode文件下会出现c_cpp_properties.json文件,打开后在includepath下手动加入路径:user,kernel等。
记得用逗号隔开
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/user",
"${workspaceFolder}/kernel"
],
(3)git错误:对象文件为空(object-file-is-empty)
原因:大概率是虚拟机未正常关闭导致的,一定要点关机而不要直接把vmware叉了呀
解决方案: 参考博客https://segmentfault.com/a/1190000008734662