I have a question: Can CodeLite compile and run individual files (just Open them) which don't need to be in a project or workspace ?
Thank you very much!
Compile and Run individual files ?
-
- CodeLite Curious
- Posts: 3
- Joined: Mon Jul 19, 2010 1:16 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compile and Run individual files ?
You can define a tool for such task using the 'external tools' plugins
from the menu: Plugins -> External Tools -> Configure tools
create new tool
Name: compile single file
Tool path: g++
Arguments: $(CurrentFileFullPath) -o myexe -g
and check the options: Capture output process
This tool will simply compile the active file using the pattern g++ '$(CurrentFileFullPath) -o myexe -g'
You can define a shortcut for this tool using the 'settings -> keyboard shortcuts' and search for the external_tool_N entry
You can also simply run it from the toolbar or from the plugins menu
Eran
from the menu: Plugins -> External Tools -> Configure tools
create new tool
Name: compile single file
Tool path: g++
Arguments: $(CurrentFileFullPath) -o myexe -g
and check the options: Capture output process
This tool will simply compile the active file using the pattern g++ '$(CurrentFileFullPath) -o myexe -g'
You can define a shortcut for this tool using the 'settings -> keyboard shortcuts' and search for the external_tool_N entry
You can also simply run it from the toolbar or from the plugins menu
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 3
- Joined: Mon Jul 19, 2010 1:16 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compile and Run individual files ?
Thanks for responding
But I think all the files will have the same name "myexe", aren't they?
Beside, if I just open 1 file by CodeLite and run it by that tool, I always have the msg
But I think all the files will have the same name "myexe", aren't they?
Beside, if I just open 1 file by CodeLite and run it by that tool, I always have the msg
Code: Select all
g++: $(CurrentFileFullPath): No such file or directory
g++: no input files
Program exited with return code: 1
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compile and Run individual files ?
Which version of codelite are you using?
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 3
- Joined: Mon Jul 19, 2010 1:16 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compile and Run individual files ?
I'm using v 2.5.2.4031
The problem happens when I trying to compile individual file with no workspace opened
The problem happens when I trying to compile individual file with no workspace opened