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:
How to resolve that problem?
The IDE doesn't want to run my program on terminal
-
- 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
Last edited by lionking on Mon Jan 27, 2020 3:34 am, edited 1 time in total.
-
- 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
Hi,
(Which CodeLite version are you using?)
codelite-exec.sh is a temporary file created to contain any 'run' instructions; e.g.
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
(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}
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
- 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
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
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
-
- 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
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.If it wasn't created, that suggests something went wrong earlier.Code: Select all
#!/bin/bash command="/full/path/to/my/binary"; ${command}
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?
I am using CodeLite v13.0.8Which CodeLite version are you using?
Yes, I have created a workspace then created a project.Did you write your code in a CodeLite Project contained in a Workspace?
Yes, my project is built successfully before trying to run.Did you successfully build your project before trying to run it?
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.Does the code run successfully in a terminal, outside CodeLite?
The same problem occurs.what happens if you create a new Workspace, add a sample Project e.g. 'Console > Simple Executable', then build and run that?
Unfortunately, by default "gnome-terminal" is the default terminal but it doesn't work with codelite I don't know why?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
I have installed "Konsole " and "lxterminal" and they both are worked well.
-
- 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
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?
The problem occurs even with the other terminals (Konsole, lxterminal).
Is there a suggestion to solve that problem?
-
- 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
That's not what I meant. Try running your real project in a normal terminal. Open a terminal and do: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
/full/path/to/your/project/binary
It works fine, but only if it's installed . You can easily tell if it is, just open your normal terminal and do:by default "gnome-terminal" is the default terminal but it doesn't work with codelite
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.
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?The problem occurs even with the other terminals (Konsole, lxterminal).
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.Is there a suggestion to solve that problem?
We can't test your system, but if you attach here, or pastebin somewhere, a tarball of your Project, we can test that.
-
- 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
Thank you for your reply.
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.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
Yes, it is installed.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"
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.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?
-
- 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
Thank you, I understand now.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.
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.