I don't understand where I'm making a mistake. My steps:
Installing vscodium, msys2. Updating msys2 packages, installing clangd extension, CodeLLdb.
Checking compilation build, work.everything works.
Installing SDL inside the project. Tree - Tree project
с_cpp_properties.json
{ "configurations": [ { "name": "Win32", "includePath": ["${workspaceFolder}/**", "${workspaceFolder}/SDL2/include/**", "${workspaceFolder}/SDL2/lib/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "C:\\msys64\\clang64\\bin\\clang++.exe", "cStandard": "c11", "cppStandard": "c++17", "intelliSenseMode": "gcc-x64" } ], "version": 4 }
launch.json
{ // Use IntelliSense to understand related properties. // Hover to view the description of an existing property. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "LLDB: Generate and debug order files", "type": "lldb", "request": "launch", "program": "${workspaceFolder}\\debug.exe", "args": [], "stopOnEntry": false, "cwd": "${workspaceFolder}", "internalConsoleOptions": "neverOpen", "environment": [], "externalConsole": false, "preLaunchTask": "Clang++: Compile single file" }, { "name": "LLDB: Debug compiled debug.exe", "type": "lldb", "request": "launch", "program": "${workspaceFolder}\\debug", "args": [], "stopOnEntry": false, "cwd": "${workspaceFolder}", "internalConsoleOptions": "neverOpen", "environment": [], "externalConsole": false, } ] }
settings.json
{ "clangd.path": "clangd", }
tasks.json
{ "tasks": [ { "type": "shell", "label": "Clang++: Compile single file", "command": "C:\\msys64\\clang64\\bin\\clang++.exe", "args": [ "${fileDirname}\\${fileBasenameNoExtension}.cpp", "-o", "debug.exe", "-g", "-Wall", "-Wextra", "-stdlib=libc++", "-std=c++20", "-I F:/Сode/Project/SDL2/include", /*"-I F:\\Сode\\Project\\SDL2\\include",*/ "-L F:/Сode/Project/SDL2/lib", "-lmingw32", "-lSDL2main", "-lSDL2", "--target=x86_64-w64-mingw" ], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": ["$gcc"], "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared" }, "detail": "Clang++: Compile a single file" }, ], "version": "2.0.0" }
Error `SDL2/SDL.h` not found, `clang(pp_file_not_found)`
I certainly read the workaround, in terms of installing packages sdl2
in msys2
. But I would like to understand what I'm doing wrong.