undefined reference to `WinMain@16'?
===

I looked at other solutions but I don't know why it says this because I have a main.
I have tried building as a console app and GUI app. It's suppose to be a GUI app(SDL). 
Does there have to be a main anywhere in the header files?
For what reason would you have a main and main not be found.

After 35 hours I finally think that this is the last error.

code blocks. mingw32

thanks