News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Black Window Doesn't show up

Started by Epitaph, January 28, 2012, 04:20:04 PM

Previous topic - Next topic

Epitaph

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!

Epitaph

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?

oBFusCATed

(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!]

Epitaph

Of course:
File--->New--->Project--->Console Application.
Then i choose C++ ,the name and the compiler.
Any ideas? :S

oBFusCATed

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!]

Epitaph

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...

oBFusCATed

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!]

Epitaph

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!)

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Epitaph

 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".

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Epitaph

Oh, then it surely doesn't have it.  ???
I'll never find the solution...