I have this snippet of code:
#include <SDL2/SDL.h>
#include <iostream>
int main(int argc, char* argv[]) {
std::cout << "!!!Hello World!!!" << std::endl;
return 0;
}
The error reported is this:
Info: Internal Builder is used for build g++ -o cavestory-developement.exe "src\cavestory-developement.o" -lmingw32 -lSDL2main -lSDL2 c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status
17:13:45 Build Failed. 1 errors, 0 warnings. (took 205ms)
Any help solving this problem would be greatly appreciated.