Help: Code::Blocks installation/troubleshooting issues. This is NOT a general programming board.
Not being able to create an executable because the linker can not find a library is in no way related to Code::Blocks. A compiler is provided in the Setup program just for convenience. That compiler is the Windows port/target of GCC provided by MinGW, which is the most commonly used compiler with Code::Blocks (even Code::Blocks for Windows is built with it). That compiler happens to include OpenGL headers and libraries, thus making it possible to create OpenGL applications using the default installation. By checking the directory with the library files, there is no file called libgl.a. The question is: do you really need that file? With a bit of Google-ing, or by following polygon7's advice, you should find out that in Windows the right library file to link against is called libopengl32.a. What you have to do is to remove gl from the list of libraries to link against in the Build options and put opengl32 instead.
Thing is, finding out the right library names for each specific application is the user's task. If you are using MinGW and it's giving you some sort of strange problems, the right place to ask is in MinGW's website or mail list. If the problems are errors or warnings produced by your code, you should ask in a programming board specific to the programming language you are using. If you have questions about OpenGL, you should ask them at OpenGL's website or in a forum that provides help for it (usually game programming boards).
Even if there are people willing to help with those specific issues here, such posts only create 'noise' in the forums because they have nothing to do with the IDE. That also means that the moderators will have to read those posts to be sure there's nothing wrong (legally speaking), and that becomes extra work for them when they are doing it in their spare time to begin with. Anything Code::Blocks related is welcomed here. We are open for discussion about any problems and suggestions, as long as they stay on-topic. As a side note, some moderators have become a bit 'grumpy' due to the constant posting of unrelated questions, or asking the same questions over and over again because users do not search the forums first.
I am aware it may be a bit difficult to really know when a specific issue is Code::Blocks related or not. Getting it to know is also part of the learning curve (sort of), and it will help you to troubleshoot all your problems more easily by always knowing in which direction you must head (as in 'where to ask').
Sorry for the long answer, and I hope you get your program to work.