Problem?

General questions regarding the usage of CodeLite
vegyta
CodeLite Curious
Posts: 2
Joined: Mon Nov 19, 2012 3:13 am
Genuine User: Yes
IDE Question: C++
Contact:

Problem?

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

Re: Problem?

Post 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
Make sure you have read the HOW TO POST thread
vegyta
CodeLite Curious
Posts: 2
Joined: Mon Nov 19, 2012 3:13 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem?

Post 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)
Post Reply