Eclipse创建项目每次运行单个文件? [英] Eclipse creating projects every time to run a single file?
问题描述
我是一个使用eclipse CDT的初学者。
通常在DEVc ++或其他轻量级IDE中,我们可以从桌面直接打开和编辑一个.cpp文件并运行它。
i am a beginner using eclipse CDT. usually in DEVc++ or other lightweight IDE's we can directly open and edit a single .cpp file from desktop and run it.
另一方面,我找不到这个简单的功能在eclipse CDT!
每次我需要运行一个.cpp文件我需要创建一个项目!
on the other hand i cannot find this simple feature in eclipse CDT! everytime i need to run a single .cpp file i need to create a project!
对于竞争性编程,如在TOPCODER copetetions或CodeForces我通常想
for competetive programming such as in TOPCODER copetetions or CodeForces i usually want to run single files quickly!
有没有办法在Eclipse CDT中运行单个.cpp文件,而不需要每次都创建一个项目?
is there a way to run single .cpp files in Eclipse CDT without needing to create a project everytime?
推荐答案
创建新文件夹(例如:tmplib)
Create a new Folder (ex: tmplib)
右键单击tmplib - >从构建中排除(调试和发布)
Right click on "tmplib" -> Resource Configuration -> Exclude from build (debug and release)
在src和tmplib文件夹之间拖放文件 - src文件夹中的任何内容都将被构建(不需要删除src文件夹)
Drag/drop files between src and "tmplib" folder - anything in src folder will be built (no need to delete src folder)
这篇关于Eclipse创建项目每次运行单个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!