Code::Blocks Forums

User forums => Help => Topic started by: Epitaph on January 28, 2012, 04:20:04 pm

Title: Black Window Doesn't show up
Post by: Epitaph on January 28, 2012, 04:20:04 pm
Hello everyone, i'm quite new to the C++ programming and i recently installed Code::Blocks for Windows XP.
The mingw version.
Everything's fine except for one thing. Whenever i hit F9 and wait for the black window to show up...well, it won't show up at all!
Even on the simplest program (hello world) i added a "cin >> x;" so i can make sure the window would show up and not just flash, but it didn't do anything.I know you can use system("pause") or something but i want this to happen automatically.

I use the :
GNU GCC Compiler

Thank you!
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 28, 2012, 04:37:11 pm
Well i went to the folder of the files, and opened the exe file (in the bin folder) and it run just fine...

But can i link that with the "Compile and Run" process?
Title: Re: Black Window Doesn't show up
Post by: oBFusCATed on January 28, 2012, 07:13:48 pm
Do you have a project?
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 28, 2012, 09:13:02 pm
Of course:
 File--->New--->Project--->Console Application.
Then i choose C++ ,the name and the compiler.
Any ideas? :S
Title: Re: Black Window Doesn't show up
Post by: oBFusCATed on January 28, 2012, 09:21:03 pm
1. Goto "Project->Properties->Build targets"
2. Verify that Type==Console application
3. "Pause when execution ends" is checked
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 28, 2012, 09:29:59 pm
Just checked.
Everything looked fine :

http://i44.tinypic.com/2qb622p.jpg

I installed dev cpp 2 hours before i installed Codeblocks. Maybe that's why it has that problem?
I uninstalled both of them after that, and reinstalled Codeblocks (about 12 hours ago - few minutes before i posted here).
Really i cannot figure why it does that...
Title: Re: Black Window Doesn't show up
Post by: oBFusCATed on January 28, 2012, 10:01:10 pm
Does your app really runs if you hit F9 (Build->Build and run)?
Add some code to write to a file or put something like "int *a=NULL; *a=5;" :)
In the second case you should get the "don't send" windows dialog.
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 29, 2012, 07:36:22 am
Yes, it runs it , but only the first time.
What i mean is that, if i haven't already pressed F9 (or click the button from the top bar), it does compile the program (i can see several stuff being written down on the Debugger window), but after a while it disappears. If i press it again, nothing will happen, except if i change part of the code (delete a ";" for example), then it runs it again and it shows me the errors.

How do i find this "don't send" windows dialog?

(Thanks for the answers mate!)
Title: Re: Black Window Doesn't show up
Post by: stahta01 on January 29, 2012, 04:42:22 pm
If it only runs once; it is likely never stop running.

Use task manager to verify that it stopped running.

Tim S.
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 29, 2012, 04:54:18 pm
 Task Manager doesn't show anything "weird" or a new program that i don't already know. Do you know the name of this task so i can ensure that?
And to start with i don't even think it opens the "black window". When i do it manually (by going to the correct folder) i can see it flash. But at Code::BLocks it won't even do that. So i guess this is my main problem. Not that it doesn't "pause".
Title: Re: Black Window Doesn't show up
Post by: stahta01 on January 29, 2012, 05:39:08 pm
The name of your program is the name of the task you are looking for use the "processes" to look for it.

Tim S.
Title: Re: Black Window Doesn't show up
Post by: Epitaph on January 29, 2012, 05:45:43 pm
Oh, then it surely doesn't have it.  ???
I'll never find the solution...