Page 1 of 1

Problem?

Posted: Mon Nov 19, 2012 4:22 am
by vegyta
Hello,i am a new user of Codelite,and i don't know if i am having a problem or not.I am running Ubuntu 12.10,and Codelite v4.1.5770.I first installed Codelite from the Ubuntu Software Center,and at the first run It showed that it was outdated,so I updated to the current version(clicked update,and opened the file with Ubuntu Software Center and updated)
I have a simple hello program(the standard when you create new project):

Code: Select all

#include <stdio.h>

int main(int argc, char **argv)
{
	printf("hello world\n");
	
	return 0;

}

The program run's fine,it displays the hello world text.In the Output View window at the Output tab,when the message Press any key to continue...,i press enter,It appers Program exited with return code: -1.My question is: shouldn't the program exit with 0?(because i have return 0?).Why is it exiting with -1?
I know that when it exits with 0,the program executed OK,but when it exit's with something else from 0,the program fails,so something is wrong.
Thanks in advance for your help.

Image

Re: Problem?

Posted: Mon Nov 19, 2012 10:18 am
by eranif
looks like Its a problem in the wrapping script. Note that codelite does not execute your code directly, but it rather wraps it in a scripts.
The error code -1 is the exit code of the script not your code

Eran

Re: Problem?

Posted: Mon Nov 19, 2012 5:37 pm
by vegyta
Ok,thank you for your answer.Is there a way to fix it?(i'm assuming that if there is no way to fix it at the present moment,this issue will be fixed in the next version of Codelite)