[HELP]Press any key to continue...

CodeLite installation/troubleshooting forum
Abi
CodeLite Curious
Posts: 3
Joined: Sat Apr 23, 2011 6:04 am
Genuine User: Yes
IDE Question: C++
Contact:

[HELP]Press any key to continue...

Post by Abi »

Hi.
I downloaded CodeLite and now using it. But there is a problem: when I 'Run' the program I wrote, there is a message on the console, "Press any key to continue." I pressed a key, but console was quit. I couldn't see my program running. What problem is it? Please help me.
Thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: [HELP]Press any key to continue...

Post by eranif »

Have you tried to debug it?
Probably your program crashes or something - try debugging it and see what happens.

Eran
Make sure you have read the HOW TO POST thread
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: [HELP]Press any key to continue...

Post by nemesis »

hej!

maybe a bit of a ridiculous question, but did you build your project and did it finish without errors (is there actually an exe in your directory)? codelite runs the files embedded in a cli without checking whether the exe actually exists (maybe something to fix in codelite?). it simply runs nothing if there's no exe but shows the 'bed' cli window in it's final state (by asking for a key to close).
you can check back by opening a cli in your project directory and try running your program yourself.

regards,
nem
Abi
CodeLite Curious
Posts: 3
Joined: Sat Apr 23, 2011 6:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: [HELP]Press any key to continue...

Post by Abi »

Thanks for you answering, but I still can't run my programs. There is only that <Press any key> message in my console after I [Build project] > [Run].
Here, I'd like to share a piece of program that wasn't run in my CodeLite.

Code: Select all

#include <stdio.h>
int main(int argc, char* argv[])
{
	int i, sum=0;
	for(i=1; i<=100; i++){
		sum+=i;
	}
	printf("1+2+3...+100=%d", sum);
	return 0;
}
When I [Build and Run] this code, I had that message. Please check it.
Thanks a lot.
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: [HELP]Press any key to continue...

Post by nemesis »

please post the output from your build- and error-pane.
Abi
CodeLite Curious
Posts: 3
Joined: Sat Apr 23, 2011 6:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: [HELP]Press any key to continue...

Post by Abi »

CodeLite.PNG
CodeLite_01.PNG
These are my CodeLite windows after I [Build and Run Project] (1st pic) and [Run Active Project] (2nd pic). I don't know why there is nothing run in my console.
In the next pic, after I pressed any key, there is one more line in the output pane, (just below the two lines in the pic) this line says [Program exited with return code: 2293456];
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: [HELP]Press any key to continue...

Post by eranif »

Have you tried adding '\n' to the printf?
Have you tried debugging you code?
Can you please post the build log? (screenshots are nice, but are limited)

There is nothing with codelite, the problem is with your code, so unless you try to above steps, I am afraid I can't help you.
Eran
Make sure you have read the HOW TO POST thread
Post Reply