如何从 Eclipse 的 clean 命令中排除文件
我想排除 Eclipse 的 Project Clean 删除的文件。我正在开发 SDL 应用程序,因此需要将 SDL.dll 文件存在于 Debug 文件夹中。
是否可以排除例如 *.dll 文件被清理操作删除?如果是这样,我该怎么做?我的 Eclipse CDT 项目中没有 makefile,因此我不能只编辑 clean 目标。
I want to exclude files from being removed by Eclipse's Project Clean. I'm working on an SDL application and I therefore need to have the SDL.dll file present in the Debug folder.
Is it possible to exclude for example *.dll files from being removed by the clean operation? If so, how do I do that? I don't have a makefile present in my Eclipse CDT project so I can't just edit the clean goal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将dll放入源文件夹中,它会自动复制到目标文件夹中
Put the dll into a source folder, it will be copied automatically in the target folder
保存时 Eclipse 将清除输出文件夹中的所有文件。如果您不想删除 dll 文件,则必须将它们从输出文件夹中移出。从您描述问题的方式来看,您似乎需要这些文件位于项目的调试路径上。我不完全确定如何在 CDT 中进行设置,但可能有一种方法可以将其添加到项目的属性中(右键单击 -> 属性)。
Eclipse will clean all files in your output folder on a save. If you don't want the dll files removed, then you must move them from the output folder. From the way that you describe your problem, it seems like you need these files to be on the debug path of your project. I'm not entirely sure how to set this up in CDT, but there is probably a way of adding this in your project's properties (right click -> properties).
排除 Ant 脚本的 clean 部分中的文件,然后将该脚本作为新项目导入到 Eclipse 中。
Exclude the file in the clean section of an Ant script, then import the script into Eclipse as a new project.