Program exited with return code: -1

General questions regarding the usage of CodeLite
mikeglaz
CodeLite Enthusiast
Posts: 13
Joined: Fri Mar 16, 2012 2:21 am
Genuine User: Yes
IDE Question: C++
Contact:

Program exited with return code: -1

Post 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
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Program exited with return code: -1

Post 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
mikeglaz
CodeLite Enthusiast
Posts: 13
Joined: Fri Mar 16, 2012 2:21 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Program exited with return code: -1

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Program exited with return code: -1

Post by eranif »

Make sure you have 'xterm' installed

Eran
Make sure you have read the HOW TO POST thread
Post Reply