Page 1 of 1

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

Posted: Sun Jan 26, 2020 3:19 am
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?

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

Posted: Sun Jan 26, 2020 2:36 pm
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

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

Posted: Sun Jan 26, 2020 10:41 pm
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

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

Posted: Mon Jan 27, 2020 4:41 am
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.

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

Posted: Mon Jan 27, 2020 5:31 am
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?

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

Posted: Mon Jan 27, 2020 2:43 pm
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.

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

Posted: Tue Jan 28, 2020 3:34 am
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.

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

Posted: Tue Jan 28, 2020 3:07 pm
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.