Page 1 of 1
codelite_exec: 22: project name can not be found
Posted: Sun Apr 09, 2017 9:00 pm
by ljbomir
Hello everyone !
I have recently installed CodeLite on Debian sid running unstable/latest updates.
And I am facing problems when executing any code. While trying to write the output to the console it fails with:
/usr/lib/codelite/codelite_exec: 22: /usr/lib/codelite/codelite_exec: ./asd: not found
Press ENTER to continue...
Although it successfully executes:
Running program: /usr/lib/codelite/codelite_xterm './asd ' '/bin/sh -f /usr/lib/codelite/codelite_exec ./asd'
Program exited with return code: 0
It seems to me like the project/file path is not being passed via its absolute path and it can not be found.
Looking into my project settings I see that "Output File" has a value of $(IntermediateDirectory)/$(ProjectName)
"Executable to run" has a value of ./$(ProjectName)
"Working Directory" --> $(IntermediateDirectory)
I guess I should play with the projects settings changing these values ?
But wonder why it does not work with defaults.
Thanks,
Lyubo
Re: codelite_exec: 22: project name can not be found
Posted: Sun Apr 09, 2017 9:14 pm
by DavidGH
Hi,
Does any part of
this thread help?
Regards,
David
Re: codelite_exec: 22: project name can not be found
Posted: Mon Apr 10, 2017 9:00 pm
by ljbomir
Hi David,
Thank you for your reply.
The suggestion in the other topic does not help me much.
My terminal is starting successfully in most of the times. I have tried different terminals like xterm, terminator and the built in the codelite one.
Currently I suspect my problem must be closed to the
"Executable to run/Debug" variable.
$(WorkspacePath)/cmake-build-$(WorkspaceConfiguration)/bin/$(ProjectName)
or
./$(ProjectName)
or the other one suggested $(IntermediateDirectory)/$(ProjectName)
does not seem to work for me.
Lyubo
Re: codelite_exec: 22: project name can not be found
Posted: Tue Apr 11, 2017 3:35 pm
by DavidGH
I've now created a 'sid' virtualbox guest (not just for this thread, I needed to anyway
). I installed the sid CodeLite 10.0, created a new workspace and new wx gui project (wxframe + wxcrafter). After building it runs normally; that's either with or without the 'Use CodeLite's built-in terminal emulator' box checked. FWIW I have the basic xfce4 install, so the default emulator is xfce4-terminal.
What am I doing that's different from you?
Did you build your own CodeLite? If so, which?
Is your project different in some way? If so, what happens if you create one as I did?
Re: codelite_exec: 22: project name can not be found
Posted: Wed Apr 19, 2017 9:06 pm
by ljbomir
Hello David,
Sorry for my late response.
I found out that when I tick the checkbox "Use CodeLite's built terminal emulator" and switch workspace configuration from Debug to Release, this works !
You can see the output of successful execution:
=====
Current working directory: /home/lyubo/codelite/123/Release
Running program: /usr/lib/codelite/codelite-terminal --exit --wait --cmd ./123
Program exited with return code: 0
=====
However when I switch Release to Debug with the same terminal, I get
=====
Current working directory: /home/lyubo/codelite/123/Debug
Running program: /usr/lib/codelite/codelite-terminal --exit --wait --cmd ./Debug/123
=====
At the console it is being shown:
======
/bin/sh: 1: ./Debug/123: not found
Hit ENTER to continue...
=====
The other terminals like 'xterm' , 'terminator' or 'codelite_xterm' does not work, nevertheless with Debug or Release workspace configuration.
Thanks!
Lyubo
Re: codelite_exec: 22: project name can not be found
Posted: Wed Apr 19, 2017 9:27 pm
by ljbomir
New update after running some more tests!
When checkbox "Use CodeLite's built terminal emulator" is ticked, it works.
When you switch Release to Debug or vice versa, you should rebuild the project to get the according directory created and then run the c/c++ program.
That was the reason Debug didn' t work for me at some point. I missed to rebuild the project.
So in summary I could say that built in CodeLite's terminal is working great.
The other terminals like xterm or terminator still don't, but at least I have a working solution and now I can start using the IDE.
Cheers
Lyubo
Re: codelite_exec: 22: project name can not be found
Posted: Thu Apr 20, 2017 1:25 am
by DavidGH
The other terminals like xterm or terminator still don't
I suspect they would if you used the full path to the executable's dir in $(IntermediateDirectory) rather than a relative path.
But anyway, you do have the default terminal working now
.