I have been having a problem with my IDE lately. I am using the latest version of Code::Blocks. When I try to build I am greeted with a wonderfully red list of error messages. All the errors are product of the initial two that read "error: iostream: no such file or directory" and "error: cstdlib: no such file or directory". No matter how I call header files I get this message. Ive checked my directory and the files are all there. Ive even taken some advice from friends, like reinstall Code::Blocks or try a new IDE, none have worked they all suffer from the same issue. It hasn't always done this, I haven't been changing settings. Any advice would help, I would really like to continue programming as soon as possible
code::block is an IDE, can be installed with or without a compiler. The errors you state suggest that your compiler isn't installed correctly.
Are you sure you have a compiler installed to work with Code::blocks? The libraries are part of any standard c++ compiler, like gcc, Microsoft, or Borland.
If those aren't your issues, could you post the code you are trying to compile?
Sorry ciphermagi, I am receiving the same errors as before.
I'm almost certain Code::Blocks was packaged with gcc. But I can try installing it to see what happens.
... I'm confused. I was just talking to a friend of mine, and by the instructions he gave me I can compile through a command prompt using gcc. But Code::Blocks still doesn't compile. I'm almost certain this wont help, but here is my code:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int Temp, Counter=0, Random=(rand()%15)+1;
Have you listed the GCC as the compiler for Code::Blocks? Go to the compiler and debugger settings near the top right and click "auto find" or something for the compiler.
Gcc is added to the path variable, my friend had me do that to compile in command prompt. I'll post as soon as I'm able to get to my computer about whether or not I'm able to select it as my compiler in the settings. Though last time I tried I don't recall seeing an ''Auto Find'' feature, all I remember is a list of about 20 different compilers (about 8 of which contained gcc in the name)
Still nothing... *sigh* This is really discouraging. I'd like to fix this without doing a complete reinstall of windows. Thanks for all the help so far though, I really appreciate it, the community here is great.
2) Install it. Now, go ahead and do "Auto-Detect" now. After that, if it's still not working, then add the MinGW directory of which came with the Code::Blocks to your Environment Variables.
Tell me if that works. If it still doesn't work then it's your you've added your Environment Variables path wrong.
Nothing at all... :(
I know I add the Environment Path correctly. Right clicked My Comp, Advanced System Settings, Environment Variables... I added both the C:\Program Files (x86)\CodeBlocks\MinGW\bin and C:\MinGW\bin directories.
Have you tried going to Windoze Add/Remove Program Wizard and removing Code::Blocks? If you don't use the wizard, sometimes windoze will hold on to some of your cfg files and apply them if you re-install.