为什么 Delphi 编译器会创建一个名为“c”的文件?在构建特定项目期间?
当我构建项目并且主窗体打开时(相当大,有数十个各种组件),构建过程会在项目文件夹中创建一个名为“c”的文件。
文件为空。
如果我关闭 IDE 中的主窗体,构建过程不会创建该文件。
如何找出导致此问题的原因以及编译器为何关心在构建开始时 IDE 中打开了哪些文件?
When I build my project and the main form is open (fairly large, dozens of components of all kind), the build process creates a file named 'c' in the project folder.
The file is empty.
If I close the main form in the IDE, the build process doesn't create that file.
How can I find out what causes this and why does the compiler care which files are open in the IDE at the moment a build is started?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您安装了 CnWizard,那么该工具将创建空的 c 文件。关于主页,这个问题已经在测试版中修复了。需要等到该版本发布。
CnWizard论坛
If you have CnWizard installed, then this tool is creating the empty c files. Regarding there homepage, this is already fixed in the beta version. Need to wait until that version is released.
CnWizard Forum
我认为您的组件之一(可能是第三方)具有自定义流代码(defineproperties 等),并生成此文件作为非标准临时文件。
如果表单打开,文件就会发生变化,因此在编译时,表单会从 .dfm 流式传输到 .res,并遍历创建该文件的组件的设计时代码。
最简单的解决方法是开始删除项目副本中的组件,直到该行为消失。然后尝试挖掘相应的设计时代码,如果你能找到罪魁祸首。
I think one of your components (probably third party) has custom streaming code (defineproperties and the like), and generates this file as a non-standard tempfile.
If the form is open, the file is mutated, so when compiling the form is streamed from .dfm to .res and going through the designtime code of that component which creates the file.
Easiest way to figure out is to start removing components in a copy of the project till the behaviour goes away. Then try to dig in the corresponding designtime code if you can find the culprit.