I’m setting up SDL in VSCode by this website https://dev.to/giovannicodes/setup-sdl2-with-visual-studio-code-and-mingw64-on-windows-14c5
and I’m stuck on including the path in C/C++ Configurations
#include <SDL2/SDL.h>
#include <iostream>
int main(int argv, char** args)
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Window *window = SDL_CreateWindow("Hello SDL", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0);
SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, 0);
bool isRunning = true;
SDL_Event event;
while (isRunning)
{
while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
isRunning = false;
break;
case SDL_KEYDOWN:
if (event.key.keysym.sym == SDLK_ESCAPE)
{
isRunning = false;
}
}
}
SDL_RenderClear(renderer);
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
SDL_RenderPresent(renderer);
}
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
It says that I should update my includePath but I don’t know where it is.
I have searched it on the internet but I’ve not found anything.
I have tried the path:
${workspaceFolder}/**
…Visual Studio CodeMinGWucrt64include
and I think it’s wrong but where is it then?
Please help, and yes, I’m pretty new in programming.
Парасоль ка is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.