Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: seafowl on March 21, 2008, 04:16:36 am
-
I'm embarrassed to ask this question since its so simple, but I can't figure out how to use CodeBlocks to compile a file. I'm using Windows Vista, and I just installed CB. All of my settings are set to the default installation settings; I haven't changed anything yet. I created a new project, and wrote this program to try it out:
#include <stdio.h>
int main(void)
{
printf("Hello World");
return 0;
}
Then I clicked the Build button on the left hand side of the Compiler tool bar - but nothing seemed to happen. I clicked Run and I was asked, "It seems that this file has not been built yet. Do you want to build it now?" I clicked Yes and nothing happened there either.
Does anyone know what step I'm missing? Perhaps I have the wrong compiler selected? Is it possible that I don't have any compilers selected at all? I realize that CodeBlocks is only an IDE but I assumed that my computer ought to have some kind of its own compiler already installed by virtue of being a computer. I assumed the list of compilers I was presented with to choose one as default were the compilers which CodeBlocks had automatically detected but I'm not sure at all. I'm new to programming, so I don't really know what to do about this.
-
If you downloaded the bundle setup of codeblocks you should have the mingw compiler installed. In any case go to http://www.codeblocks.org/downloads/5 and donwload the one that says codeblocks-8.02mingw-setup.exe
-
I had the same problem but i've fixed it. :D
Try this:
Go to Settings -> Compiler & Debugger Settings. then get to the Tab "Toolchain executables" and do auto-detect (compiler's installation directory).
That worked for me 8)
Hope it helps!
-
Good Information! :).
Thanks
- Meenakshi Sundaram
NetLink Technologies Ltd,
Chennai.