I'm writing an SFML game and when I try to run the code this is the error I get:
The procedure entry pointcould not be located in the dynamic link library
OK, the note you added tells me that the SFML stuff was compiled with another compiler version/configuration, newer one if memory serves right.
You need to make sure that
SFML and your code are compiled by the same compiler (versions/configuration) or at least compatible compiler (versions/configuration).
I see that the latest binary packages of SFML use GCC 4.7, and the latest Code::Blocks (mingw) comes with the TDM GCC 4.7 build, so it might be enough to upgrade Code::Blocks and make sure you use the SFML GCC 4.7 TDM (SJLJ) package (and use the gcc that comes with Code::Blocks, of course).
Otherwise, you should probably install the TDM-GCC 4.7 compiler build manually, or if nothing works, compile SFML yourself.