i want to run a c program in code blocks ide but not able install the compiler to run . How to do it ?
Code::Blocks comes with a MinGW so you should be able to write the code and do F9.
This is the example C code that comes with CB
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
And it works with F9
Build and run your program separately instead of hitting F9. Hit Ctrl+F9 to build the program, check the build output to make sure it built successfully, and then hit Ctrl+F10 to run it. If the program doesn't run, did you get any error messages?
Instead of running the program, you may want to use F8 to run the debugger.
Also, browse to your project folder and see if you can find the compiled program there. If not, then something likely went wrong during the build process and you somehow didn't get any output messages about it.
have you gotton code blocks with the MinGW pakage if not then download it separately using the auto installer http://sourceforge.net/downloads/mingw/Automated%20MinGW%20Installer/mingw-get/mingw-get-0.1-mingw32-alpha-2-bin.tar.gz/
but if you want gcc 4.5 then you will have to download every component separability.
After installation that open codeblocks goto compiler and debugger tab under settings , from there goto tool chain executables and click auto detect, it should work.