Page 1 of 1

Program exited with return code: -1

Posted: Thu Jun 28, 2012 2:40 am
by mikeglaz
I just installed CodeLite from SourceForge. I'm using Linux Mint 13 which is based on Ubuntu. I created a Hello World program to test it out:

Code: Select all

#include <iostream>

using namespace std;

int main( int argc, char** argv )
{
	cout << "Hello World!";
	return 0;
}
It compiles with 0 errors, 0 warnings but when I try to run it I get this output:
Current working directory: /home/mike/.codelite/My Workspace/hello/Debug
Running program: /usr/bin/codelite_xterm './hello ' '/bin/sh -f /usr/bin/codelite_exec ./hello '
Program exited with return code: -1
help,
mike

Re: Program exited with return code: -1

Posted: Thu Jun 28, 2012 12:12 pm
by DavidGH
Hi Mike,
It compiles with 0 errors, 0 warnings
Check the 'Build' tab to make sure it really worked, and/or look for the 'hello', try running it in a terminal.
Program exited with return code: -1
They always do...

Part of the problem may be that that code won't run for long. Try adding a 'getchar()' or similar so you have a better chance to see any output. Or create a workspace/project and build one of the template programs from the New Class wizard.

Regards,

David

Re: Program exited with return code: -1

Posted: Fri Jun 29, 2012 1:15 am
by mikeglaz
oh yeah, you're right. I found the 'hello' executable. I guess when I run it from CodeLite it doesn't open an output window. And like I said, in the output at the bottom that CodeLite provides I get the 'Program exited with return code: -1' message. Do you know what I need to do for the output to show up?

thanks,
mike

Re: Program exited with return code: -1

Posted: Fri Jun 29, 2012 8:25 am
by eranif
Make sure you have 'xterm' installed

Eran