Return code 255 error on Mac

CodeLite installation/troubleshooting forum
arober
CodeLite Curious
Posts: 2
Joined: Mon Apr 23, 2012 3:39 pm
Genuine User: Yes
IDE Question: C++
Contact:

Return code 255 error on Mac

Post 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.
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Return code 255 error on Mac

Post 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.
arober
CodeLite Curious
Posts: 2
Joined: Mon Apr 23, 2012 3:39 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Return code 255 error on Mac

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

Re: Return code 255 error on Mac

Post 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
Make sure you have read the HOW TO POST thread
Post Reply