Author Topic: Black Window Doesn't show up  (Read 9679 times)

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Black Window Doesn't show up
« 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!

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #1 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Black Window Doesn't show up
« Reply #2 on: January 28, 2012, 07:13:48 pm »
Do you have a project?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #3 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Black Window Doesn't show up
« Reply #4 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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #5 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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Black Window Doesn't show up
« Reply #6 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #7 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!)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Black Window Doesn't show up
« Reply #8 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #9 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".

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Black Window Doesn't show up
« Reply #10 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Epitaph

  • Single posting newcomer
  • *
  • Posts: 7
Re: Black Window Doesn't show up
« Reply #11 on: January 29, 2012, 05:45:43 pm »
Oh, then it surely doesn't have it.  ???
I'll never find the solution...