glew32.dll Bad Image

When i try to compile freeglut with glew i get this error:

GLUT.exe- Bad Image

J:\OpenGLCodeBlocks\bin\glew32.dll is either not designed to run
on Windows or it contains an error. Try installing the program 
again using the original installation media or contact your system 
administrator or the software vender for support

I am using codeblocks

Thanks