Page 1 of 1

Return code 255 error on Mac

Posted: Mon Apr 23, 2012 5:46 pm
by arober
I apologize if this specific problem was addressed somewhere else in the forum. I searched and could not find anything similar enough to help me.

I just installed codelite v 3.5.5376 on a mac running OS X 10.7.3.

This is the code I tried running.

#include <iostream>
using namespace std;

int main()
{
cout<<"Hello World";
return ();
}

It returned this message in the output window

Current working directory: /Users/tonyroberts/Library/Application Support/codelite/Computer Science/Practice
Running program: /Users/tonyroberts/Downloads/CodeLite 2.app/Contents/SharedSupport/OpenTerm 'cd "/Users/tonyroberts/Library/Application Support/codelite/Computer Science/Practice" && cd "./Release" && ./Practice '
Program exited with return code: 255

I tried going through workspace and retagging (full), it produced this in the output window

Current working directory: /Users/tonyroberts/Library/Application Support/codelite/Computer Science/Practice
Running program: /Users/tonyroberts/Downloads/CodeLite 2.app/Contents/SharedSupport/OpenTerm 'cd "/Users/tonyroberts/Library/Application Support/codelite/Computer Science/Practice" && cd "./Release" && ./Practice '
Program exited with return code: -1


I have on a semesters worth of programming experience, and am unsure as how to correct this, any help is much appreciated.

Re: Return code 255 error on Mac

Posted: Mon Apr 23, 2012 7:39 pm
by Jarod42
Perhaps you code didn't produce the executable.

You "return ()" and main expects a int a return.

A setting you can activate is :
Project settings->Common settings ->general : pause when execution ends.

Re: Return code 255 error on Mac

Posted: Mon Apr 23, 2012 11:21 pm
by arober
I created a new project and did not modify the following code:

#include <stdio.h>

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

The output window gave this error:

Current working directory: /Users/tonyroberts/Library/Application Support/codelite/Computer Science/Test
Running program: /Users/tonyroberts/Downloads/CodeLite 2.app/Contents/SharedSupport/OpenTerm 'cd "/Users/tonyroberts/Library/Application Support/codelite/Computer Science/Test" && cd "./Release" && ./Test '
Program exited with return code: -1

Re: Return code 255 error on Mac

Posted: Tue Apr 24, 2012 9:45 am
by eranif
Did you try running it from the command line?
What is your build output? Did it compile without any errors?

Please read this before posting:

viewtopic.php?f=3&t=804

Eran