I know the code works; I have had my comp reformatted recently, and have taken the code from a backup. I believe that there is a step that I have forgotten in reinstalling Code::Blocks and SDL. Can anyone explain to me what this error is exactly, so I have a better idea of what to look for?
The error message you are getting is indicating that the linker (ld.exe) can't find a library (SDLmain.dll). I am not familiar with CodeBlocks, but see if there is a way to put in search directories that contain your libraries. The other possibility is that when you built/installed libSDL, it didn't create or put SDLmain.dll in a "well known" location (for example, in linux, a well known location is usually /usr/local/lib, /usr/lib or /opt/lib)