1 year ago

#364823

test-img

김동주

fatal error: 'SDL.h' file not found ON MAC

I tried to compile codes and i have an error.

In file included from ui.c:1:
./ui.h:3:10: fatal error: 'SDL.h' file not found
#include <SDL.h>
     ^~~~~~~
1 error generated.

but i've already installed SDL library on my mac and set includePath on VScode. here is a setting of my cpp_properties.json

{
"configurations": [
    {
        "name": "Mac",
        "includePath": [
            "${workspaceFolder}/**",
            "/Users/kimdongju/Dungeonrush/src/**",
            "/usr/local/Cellar/sdl/1.2.15_3/include/SDL/**",
            "/usr/local/Cellar/sdl2/2.0.20/include/SDL2/**",
            "/usr/local/Cellar/sdl2_image/2.0.5/include/SDL2/**",
            "/usr/local/Cellar/sdl2_mixer/2.0.4_3/include/SDL2/**",
            "/usr/local/Cellar/sdl2_net/2.0.1/include/SDL2/**",
            "/usr/local/Cellar/sdl2_ttf/2.0.18_1/include/SDL2/**"
        ],
        "defines": [],
        "macFrameworkPath": [
            
            "/Library/Developer/CommandLineTools/SDKs
            /MacOSX.sdk/System/Library/Frameworks"
        ],
        "compilerPath": "/usr/bin/clang",
        "cStandard": "c17",
        "cppStandard": "c++98",
        "intelliSenseMode": "macos-clang-x64"
    }
],
"version": 4
}

c

macos

visual-studio-code

sdl

sdl-2

0 Answers

Your Answer

Accepted video resources