I have SDL files installed into my lib and include directories in mingw but when I go to compile my programs I get this message

Code:
Z:\MinGW\lib/libSDLmain.a(SDL_win32_main.o): In function `console_main':/home/hercules/public_cvs/SDL/src/main/win32/SDL_win32_main.c:217: undefined reference to `SDL_main'
I added the libraries SDLmain, SDL.dll and mingw32 to my linker settings but I'm still getting that error.