The IDE doesn't want to run my program on terminal

CodeLite installation/troubleshooting forum
lionking
CodeLite Curious
Posts: 9
Joined: Sun Jan 26, 2020 3:04 am
Genuine User: Yes
IDE Question: C++
Contact:

The IDE doesn't want to run my program on terminal

Post by lionking »

Firstly, I am working on Ubuntu v19.10.
I have created a simple c/c++ code and everything is good except when running my code to show the result of my code the following happened:

Image

How to resolve that problem?
Last edited by lionking on Mon Jan 27, 2020 3:34 am, edited 1 time in total.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by DavidGH »

Hi,

(Which CodeLite version are you using?)

codelite-exec.sh is a temporary file created to contain any 'run' instructions; e.g.

Code: Select all

#!/bin/bash
command="/full/path/to/my/binary";
${command}
If it wasn't created, that suggests something went wrong earlier.

Did you write your code in a CodeLite Project contained in a Workspace?

Did you successfully build your project before trying to run it?
Does the code run successfully in a terminal, outside CodeLite?

If none of the above seem relevant, what happens if you create a new Workspace, add a sample Project e.g. 'Console > Simple Executable', then build and run that?

Regards,

David
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by eranif »

As a temporary workaround, try switching between the terminals.
Check Settings->Preferences->Terminal

And select a different one (you need to have it installed...)
Also, some recent changes were done to the Gnome Terminal, it would help to know which version of CodeLite you are using
Make sure you have read the HOW TO POST thread
lionking
CodeLite Curious
Posts: 9
Joined: Sun Jan 26, 2020 3:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by lionking »

DavidGH wrote: Sun Jan 26, 2020 2:36 pm (Which CodeLite version are you using?)

codelite-exec.sh is a temporary file created to contain any 'run' instructions; e.g.

Code: Select all

#!/bin/bash
command="/full/path/to/my/binary";
${command}
If it wasn't created, that suggests something went wrong earlier.

Did you write your code in a CodeLite Project contained in a Workspace?

Did you successfully build your project before trying to run it?
Does the code run successfully in a terminal, outside CodeLite?

If none of the above seem relevant, what happens if you create a new Workspace, add a sample Project e.g. 'Console > Simple Executable', then build and run that?
Which CodeLite version are you using?
I am using CodeLite v13.0.8
Did you write your code in a CodeLite Project contained in a Workspace?
Yes, I have created a workspace then created a project.
Did you successfully build your project before trying to run it?
Yes, my project is built successfully before trying to run.
Does the code run successfully in a terminal, outside CodeLite?
I have tried to use another IDE (Netbeans v11.2) and I have created a similar project and it runs fine on the terminal without problems.
what happens if you create a new Workspace, add a sample Project e.g. 'Console > Simple Executable', then build and run that?
The same problem occurs.


eranif wrote: Sun Jan 26, 2020 10:41 pm As a temporary workaround, try switching between the terminals.
Check Settings->Preferences->Terminal

And select a different one (you need to have it installed...)
Also, some recent changes were done to the Gnome Terminal, it would help to know which version of CodeLite you are using
Unfortunately, by default "gnome-terminal" is the default terminal but it doesn't work with codelite I don't know why?
I have installed "Konsole " and "lxterminal" and they both are worked well.
lionking
CodeLite Curious
Posts: 9
Joined: Sun Jan 26, 2020 3:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by lionking »

unfortunately, the problem returned again when opening my project and run it.
The problem occurs even with the other terminals (Konsole, lxterminal).

Is there a suggestion to solve that problem?
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by DavidGH »

Does the code run successfully in a terminal, outside CodeLite?
I have tried to use another IDE (Netbeans v11.2) and I have created a similar project and it runs fine on the terminal without problems
That's not what I meant. Try running your real project in a normal terminal. Open a terminal and do:
/full/path/to/your/project/binary
by default "gnome-terminal" is the default terminal but it doesn't work with codelite
It works fine, but only if it's installed ;) . You can easily tell if it is, just open your normal terminal and do:
which gnome-terminal
If it is installed, it will print "/usr/bin/gnome-terminal"
I have installed "Konsole " and "lxterminal" and they both are worked well.
The problem occurs even with the other terminals (Konsole, lxterminal).
Do you mean, at first CodeLite ran your project OK when konsole/lxterminal were selected, but now the same terminals don't work? Or did they 'work well' for other things, but never for CodeLite?
Is there a suggestion to solve that problem?
I can't guess why terminals fail to work for your CodeLite on your ubuntu, but work well for other people. It must either be something different about your system, or about your Workspace/Project.
We can't test your system, but if you attach here, or pastebin somewhere, a tarball of your Project, we can test that.
lionking
CodeLite Curious
Posts: 9
Joined: Sun Jan 26, 2020 3:04 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by lionking »

Thank you for your reply.
That's not what I meant. Try running your real project in a normal terminal. Open a terminal and do:
/full/path/to/your/project/binary
there was a problem in my code but it has been resolved and CodeLite IDE returned to work again with "Konsole " and "lxterminal" terminals but the "gnome-terminal" terminal still doesn't work because of the same problem.
It works fine, but only if it's installed ;) . You can easily tell if it is, just open your normal terminal and do:
which gnome-terminal
If it is installed, it will print "/usr/bin/gnome-terminal"
Yes, it is installed.
Image
Do you mean, at first CodeLite ran your project OK when konsole/lxterminal were selected, but now the same terminals don't work? Or did they 'work well' for other things, but never for CodeLite?
As I mentioned previously there was a problem in my code but after it has been resolved "konsole" and "lxterminal" returned to work again but the "gnome-terminal" terminal still doesn't work.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: The IDE doesn't want to run my program on terminal

Post by DavidGH »

there was a problem in my code but it has been resolved and CodeLite IDE returned to work again with "Konsole " and "lxterminal" terminals but the "gnome-terminal" terminal still doesn't work because of the same problem.
Thank you, I understand now.

I just tested 13.0.8 here and I get the same problem with gnome-terminal. As eranif implied earlier, it was a bug in this release, and was fixed 6 days ago: see https://github.com/eranif/codelite/pull/2421.

So you will need to continue using a different terminal until the next CodeLite release. Or, if you really want to use gnome-terminal, download and build the current git version, or revert to an older CodeLite.
Post Reply