Page 1 of 1
[HELP]Press any key to continue...
Posted: Sat Apr 23, 2011 6:15 am
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.
Re: [HELP]Press any key to continue...
Posted: Sun Apr 24, 2011 9:02 am
by eranif
Have you tried to debug it?
Probably your program crashes or something - try debugging it and see what happens.
Eran
Re: [HELP]Press any key to continue...
Posted: Tue Apr 26, 2011 7:58 pm
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
Re: [HELP]Press any key to continue...
Posted: Wed Apr 27, 2011 6:22 pm
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.
Re: [HELP]Press any key to continue...
Posted: Wed Apr 27, 2011 9:37 pm
by nemesis
please post the output from your build- and error-pane.
Re: [HELP]Press any key to continue...
Posted: Thu Apr 28, 2011 4:56 am
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];
Re: [HELP]Press any key to continue...
Posted: Thu Apr 28, 2011 10:07 am
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