I am new to c++, and I am making my first game using SLD2, with my IDE being VS code
Just to not leave anything out, I will ramble the tale of how this problem came to be:
after setting up everything, I ran the file just to get the error "main.cpp:4:10: fatal error: SDL2/SDL.h: No such file or directory"
So I looked up a tutorial on how to set up SDL2
The tutorial involved setting up a makefile. so I set it up, ran it again, same error. after rewatching the tutorial, i realized I had to run the make command, and to do so I needed a .exe file which I didn't have. so i used the MSYS2 console to install make.exe. it worked, according to the console, but make was nowhere to be found, and neither was "mingw32-make.exe", which is another name for the file.
so I went ahead and installed mingw again, and this time i used the mingw installer instead of msys2, and voila: mingw32-make is now on my computer.
I set the path variable, and went back to my code. ran the make command in the VS code integrated terminal.
then i got the error
"mingw32-make: ***no targets specified and no makefile found"
afterwards I renamed the file to make.
same error, but now it's:
"make: ***no targets specified and no makefile found"
as for my code itself it's just a helloworld script:
#include <iostream>
#include <string>
#include <vector>
#include <SDL2/SDL.h>
int main() {
std::cout << "Hello World!";
return 0;
}
could I have done anything wrong?
edit: the makeflie contents are:
all:
g++ -I src/include -L src/lib -o main main.cpp -lmingw32 -lSDL2main -lSDL2