当尝试在 Ubuntu 20.01 LTM 中使用 VS Code 设置 SDL2 时,我收到以下 VS Code 错误:
cannot open source file "begin_code.h" (dependency of "SDL2/SDL.h")
有小费吗?
只需添加"/usr/include/SDL2/"
到你的 c_cpp_properties.json 像这样:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/SDL2/"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu18",
"cppStandard": "gnu++14",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)