【发布时间】:2020-02-13 07:57:37
【问题描述】:
我正在尝试在我的项目中将 SDL_image 扩展库包含到 SDL.framework 中,但 VScode 的 IntelliSense 不断在我的 #include<SDL_image.h> 下划线并带有错误行。它会产生以下错误:
cannot open source file "SDL2/SDL.h" (dependency of "SDL_image.h")
我成功地编辑了 c_cpp_properties.json includePath,因此 IntelliSense 识别了 SDL 框架,但是当尝试对 SLD_image 做同样的事情时它失败了。
这是我的 c_cpp_properties.json 文件:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Library/Frameworks/SDL2_image.framework/Headers",
"/Library/Frameworks/SDL2.framework/Headers",
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
【问题讨论】:
标签: c++ json visual-studio-code sdl