so i already spent my whole day trying to get sdl to work with my c++, heres what i have now
makefile:
g++ -I src\include -L C:\Users\48608\Desktop\cpp\sdlproject\src\x64lib -o main main.cpp -lSDL2main -lSDL2```
c++ tutorial code 💀:
```#include <iostream>
#include <SDL2/SDL.h>
const int WIDTH = 800, HEIGHT = 800;
int main( int argc, char *argv[] ) {
SDL_Init( SDL_INIT_EVERYTHING);
SDL_Window *window = SDL_CreateWindow("sdl lol", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_ALLOW_HIGHDPI);
if (NULL == window) {
std::cout << "Couldnt create window: " << SDL_GetError() << std::endl;
return 1;
}
SDL_Event windowEvent;
while (true) {
if (SDL_PollEvent(&windowEvent)) {
if (SDL_QUIT == windowEvent.type) {
break;
}
}
}
SDL_DestroyWindow( window );
SDL_Quit();
return EXIT_SUCCESS;
}```
directories (check image)