C++ keeps opening two black windows on execution.

No matter what I run in C++, as soon as I hit F9, it opens up two black windows. The first black window closes as soon as I enter the information it is waiting for. The second one stays open, waits for information just like the first, but stays open after completion and lets me know it completed successfully, not closing until I press a key for it to do so.

I am running Windows 7, MinGW, and Code::Blocks. I have looked through all the settings and also looked around the web for a solution to no avail. It isn't a huge setback of course, just a bit annoying to have the one initial window pop up that is fairly worthless. If anyone can fill me in on a solution, I'd appreciate it.
Are you doing something weird like creating a separate console?

EDIT:

And did Code::Blocks always do this? Or is it just this way for this one program?
Last edited on
I'm not creating a separate console, no. Also, yes, it has always done this. I have tried new workspaces, new projects, etc., but it always does this.
It sounds like you have your project open twice OP. Code Blocks supports "Batch Building" which compiles multiple targets at a time with one operation. If you have this turned on and your project is opened twice in the same work space then this is the kind of behavior I would expect.

I can't remember where this setting is right now and unfortunately Code Blocks site is having some trouble at the moment, but this should be easy enough to resolve once that gets fixed.
Topic archived. No new replies allowed.