1) You have system("pause"); without the necessary library to execute the statement.
Add #include <stdlib.h>
2) Your other error says "undefined reference to WinMain@16 C++"
From what I know, there are a handful of ways to fix this. You can copy your code and paste it in a new project (meaning a complete restart may fix it).
You can also go to project, build option, linker settings tab, link libraries, click add, write this "mingw32;libSDL.a;libSDLmain.a" (without the quotation marks), go to "Search directories" --> "Linker", and add MinGW.