Application runs but NOT within IDE

CodeLite installation/troubleshooting forum
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Application runs but NOT within IDE

Post by zaphod »

I have Linux Mint 14, gcc 4.7.2 with Codelite 5.1
My application runs just fine outside the IDE and it runs with the debugger within the IDE. But it won't run directly from the IDE.

The interface script output looks like this:
Current working directory: /media/art/C/art_show
Running program: /usr/bin/codelite_xterm './art_show ' '/bin/sh -f /usr/bin/codelite_exec ./art_show '
Program exited with return code: -1
I had been using Ubuntu 10.10 and an earlier Codelite -- all of which still works just fine from the same project file.

I originally titles this post: "Compiled executable is owned by root" but that was a red herring.
The work drive is formatted NTFS and mounted with the following fstab line:
UUID=029CFEEB0842DBCD /media/art ntfs-3g rw,dmask=000,fmask=000,umask=000,suid,dev,auto,async,exec,locale=en_US.utf8 0 2
(This takes care of making executables run on NTFS drives -- a problem I once had)


Any help will be appreciated...
DJBobo
CodeLite Enthusiast
Posts: 18
Joined: Sun Apr 05, 2009 9:46 am
Genuine User: Yes
IDE Question: C++
Location: Southern Russia
Contact:

Re: Application runs but NOT within IDE

Post by DJBobo »

I have this problem too on Xubuntu 12.04
DJBobo
CodeLite Enthusiast
Posts: 18
Joined: Sun Apr 05, 2009 9:46 am
Genuine User: Yes
IDE Question: C++
Location: Southern Russia
Contact:

Re: Application runs but NOT within IDE

Post by DJBobo »

I got the output:

Code: Select all

Running program: x-terminal-emulator -sb -title './MyNewGrid ' -e './MyNewGrid '
Program exited with return code: -1
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Application runs but NOT within IDE

Post by eranif »

DJBobo wrote:I got the output:

Code: Select all

Running program: x-terminal-emulator -sb -title './MyNewGrid ' -e './MyNewGrid '
Program exited with return code: -1
Have you tried running this *exact* command directly from the command line?

Eran
Make sure you have read the HOW TO POST thread
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Re: Application runs but NOT within IDE

Post by zaphod »

Yes, I have just run the command from the command line to no effect:
clive@Q9550 ~ $ cd /media/art/C/art_show
clive@Q9550 /media/art/C/art_show $ /usr/bin/codelite_xterm './art_show ' '/bin/sh -f /usr/bin/codelite_exec ./art_show '
So I checked that codelite_xterm was present, and it seems to be:
clive@Q9550 /media/art/C/art_show $ ls -l /usr/bin/codelite_xterm
-rwxr-xr-x 1 root root 668 Mar 20 13:32 /usr/bin/codelite_xterm
Is codelite_xterm just a bash script?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Application runs but NOT within IDE

Post by eranif »

zaphod wrote:Is codelite_xterm just a bash script?
Yes, its just a bash script. Do you have xterm installed? Try installing xterm and see if it help

Eran
Make sure you have read the HOW TO POST thread
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Re: Application runs but NOT within IDE

Post by zaphod »

Will check that xterm is installed and report back in a week...
mindworm
CodeLite Curious
Posts: 1
Joined: Thu Mar 28, 2013 3:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Application runs but NOT within IDE

Post by mindworm »

I had the exact same problem under Ubuntu 12.10 with GCC 4.7.2 and Codelite 5.1 from the official repositories.

The execution path seems to be incorrect:

Code: Select all

Running program: /usr/lib/codelite/codelite_xterm './test_app ' '/bin/sh -f /usr/bin/codelite_exec ./test_app '
It should be /usr/bin/codelite/codelite_xterm.

As I don't know how to change that path in Codelite, I was able to solve the problem by just creating the directory codelite in /usr/lib and placing a symbolic link to /usr/bin/codelite_xterm within that folder.

Some kind of a dirty solution, but well, it works. :D
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Application runs but NOT within IDE

Post by eranif »

mindworm wrote:It should be /usr/bin/codelite/codelite_xterm.
According to the other posts, they all have their path set to /usr/bin/codelite_xterm - so I don't think its the same case.

Even if you installed the latest 5.1, your configuration files were not modified, so it might be there from previous versions of codelite

Eran
Make sure you have read the HOW TO POST thread
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Re: Application runs but NOT within IDE

Post by zaphod »

I have just installed xterm on Mint 14 and things work fine :) It is apparently not part of the standard installation.

sudo apt-get install xterm


Thanks Eran.
Post Reply