What i'm trying to do is create a 3d game engine with opengl and i want to be multi platform. I'm trying to use code-blocks for this reason but i'm having trouble setting up opengl for code-blocks but i can't find any descent tutorial for this. please help me with this.
OpenGL on its own does not have a single crossplatform way to set up a window (or get input, or do audio). For those things you'll need at least one other library.
FreeGLUT is a popular option for creating windows and setting up OpenGL.
I personally prefer SFML which does the same, and also has audio functions, and can load various image types (png,jpg)
So yeah... pick one and run with it. SFML has tutorials on its site. Just take what is necessary for creating a window and ignore the drawing stuff (you'll use OpenGL for drawing). I know little about FreeGLUT so I can't really recommend any tutorials for it.