Hi All,
I'm a new user to Codelite. The program appears to be functioning properly (when I purposely break my code the appropriate errors appear) but when I try to run the program terminal seems to not be able to find the .cpp file. Codelite returns the following error:
Current working directory: /Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1/Debug
Running program: /Applications/CodeLite.app/Contents/SharedSupport/OpenTerm 'cd "/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1" && cd "./Debug" && ./Chapter_1_Lab_1 '
Program exited with return code: -1
Terminal returns the following error:
(comp name):~ cjnboston$ cd "/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1" && cd "./Debug" && ./Chapter_1_Lab_1
-bash: ./Chapter_1_Lab_1: No such file or directory
I've spent a lot of time trying to diagnose this. I'm running a Mac OS 10.6.8 (which I completely reformatted last night in case the RoR programming i was being taught a few years ago was conflicting). I appreciate any assistance - I'm very new to programming but finding it addictive!
Corinna
Program exited with return code: -1
- cjnboston
- CodeLite Curious
- Posts: 5
- Joined: Thu Aug 25, 2011 8:03 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
It appears that codelite does not find the executable.
The question is: did you build your project and whether the build ended successfully?
In order for me to able to help you, I will need to see the complete build log.
Please read this:
viewtopic.php?f=3&t=804#p3562
Eran
The question is: did you build your project and whether the build ended successfully?
In order for me to able to help you, I will need to see the complete build log.
Please read this:
viewtopic.php?f=3&t=804#p3562
Eran
Make sure you have read the HOW TO POST thread
- cjnboston
- CodeLite Curious
- Posts: 5
- Joined: Thu Aug 25, 2011 8:03 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
Hi Eran,
I did build my project successfully. When I did some remedial error checking (reversing the cout arrows, some other things) it gave the proper error messages. The build log is as follows:
g++ -c "/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1/main.cpp" -g -W -o ./Debug/main.o -I. -I. -I/usr/include/qt4 -I/usr/include/qt4/QtGui
g++ -o ./Debug/Chapter_1_Lab_1 ./Debug/main.o -L. -L/usr/lib/qt4 -lQtCore -lQtGui
ld: warning: directory '/usr/lib/qt4' following -L not found
ld: library not found for -lQtCore
collect2: ld returned 1 exit status
make[1]: *** [Debug/Chapter_1_Lab_1] Error 1
make[1]: Leaving directory `/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1'
make: *** [All] Error 2
make: Leaving directory `/Users/cjnboston/Library/Application Support/codelite/COSC_102'
----------Build Ended----------
0 errors, 0 warnings
Thanks for the idea. Could you point me in the right direction to fix the issue?
I did build my project successfully. When I did some remedial error checking (reversing the cout arrows, some other things) it gave the proper error messages. The build log is as follows:
g++ -c "/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1/main.cpp" -g -W -o ./Debug/main.o -I. -I. -I/usr/include/qt4 -I/usr/include/qt4/QtGui
g++ -o ./Debug/Chapter_1_Lab_1 ./Debug/main.o -L. -L/usr/lib/qt4 -lQtCore -lQtGui
ld: warning: directory '/usr/lib/qt4' following -L not found
ld: library not found for -lQtCore
collect2: ld returned 1 exit status
make[1]: *** [Debug/Chapter_1_Lab_1] Error 1
make[1]: Leaving directory `/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1'
make: *** [All] Error 2
make: Leaving directory `/Users/cjnboston/Library/Application Support/codelite/COSC_102'
----------Build Ended----------
0 errors, 0 warnings
Thanks for the idea. Could you point me in the right direction to fix the issue?
- cjnboston
- CodeLite Curious
- Posts: 5
- Joined: Thu Aug 25, 2011 8:03 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
A little bit more information:
I'm running version Codelite v2.10.0.4780 on a MacBook Pro with OS 10.6.8. I downloaded Xcode 3 last night when I rebuilt my mac.
I'm running version Codelite v2.10.0.4780 on a MacBook Pro with OS 10.6.8. I downloaded Xcode 3 last night when I rebuilt my mac.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
Even though codelite reported : "0 errors, 0 warnings" it is a bug... your code did not compile successfully as seen in the code qouted above.cjnboston wrote:ld: warning: directory '/usr/lib/qt4' following -L not found
ld: library not found for -lQtCore
collect2: ld returned 1 exit status
make[1]: *** [Debug/Chapter_1_Lab_1] Error 1
make[1]: Leaving directory `/Users/cjnboston/Library/Application Support/codelite/COSC_102/Chapter_1_Lab_1'
I see that you are trying to build a QT project, however, it seems like you dont have Qt installed on your machine or the paths are incorrect
Eranld: warning: directory '/usr/lib/qt4' following -L not found
Make sure you have read the HOW TO POST thread
- cjnboston
- CodeLite Curious
- Posts: 5
- Joined: Thu Aug 25, 2011 8:03 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
Brilliant. Thank you so much. I'll install Qt and retry!
- cjnboston
- CodeLite Curious
- Posts: 5
- Joined: Thu Aug 25, 2011 8:03 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Program exited with return code: -1
That fixed my issue. Thank you so much for your help.