Delphi 7 RLINK32 读取 dfm 文件时出错 - 读取失败

发布于 2024-10-05 19:56:20 字数 277 浏览 0 评论 0原文

我刚刚遇到了一个不知从何而来的问题...... 当项目构建时,DFM 文件可以从 Delphi 中正常读取,但是当我从命令行(dcc32)构建它时,我收到错误错误:RLINK32:读取文件“update.dfm”失败读取

什么更奇怪的是,另一个包含相同文件的项目构建时 Delphi 和 dcc 都没有错误。

有谁知道什么可能导致这样的事情吗?

我尝试从另一个位置构建,仍然一样。

操作系统是Windows Server 2008。权限似乎是正确的。

I just run into a problem that came out of nowhere...
A DFM file gets read just fine from Delphi when project is built, but when I build it from command line (dcc32) I get error Error: RLINK32: Error reading file "update.dfm" Failed read

What is more stranger another project containing same file builds with no error from both Delphi and dcc.

Does anyone have a clue of what could cause something like this?

I tried to build from another location, still same.

Operating system is Windows Server 2008. Permissions seems correct.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

琴流音 2024-10-12 19:56:20

使用 SysInternals 进程监视器,并在何时进行监视它会寻找update.dfm

您可能会看到 DCC32 疯狂地到处搜索 update.dfm(除了它所在的地方)。或者也许它会找到它,但 OpenFile 失败并出现错误。

不管怎样:你都会知道到底发生了什么。

Use SysInternals Process Monitor, and watch when it goes looking for update.dfm.

You'll probably see DCC32 frantically searching everywhere for update.dfm (except the place where it is). Or maybe it will find it, but OpenFile fails with an error.

Either way: you'll find out what exactly is going on.

小女人ら 2024-10-12 19:56:20

要尝试缩小问题的原因,请使用文本编辑器打开 dfm,然后逐渐删除属性并保存,直到构建正常运行。这至少可以表明问题是否出在 dfm 中的某个特定组件上。

To try and narrow the cause of the problem down, open the dfm with a text editor, and gradually remove properties and save until the build works. That would at least indicate if it's a problem with a particular component in the dfm.

三生一梦 2024-10-12 19:56:20

与 dcc32 的主要不同之处在于环境选项中的库路径。当您从 IDE 构建时,会使用它。当您运行 dcc32 时,您需要指定它。

您可以通过在 dcc32 上设置 -I 和 -U 选项的库路径来完成此操作,也可以使用 dcc32.cfg 文件来保存构建的所有配置。

RLINK32 可以表示重复资源,因此请考虑重命名其中一种形式以避免冲突。话虽如此,希望库路径应该能解决这个问题。

The main thing that is different with a dcc32 is the library path in the environment options. When you build from the IDE this is used. When you run dcc32 you need to specify this.

You can do this by setting the library path for the -I and -U options on dcc32, or you can use a dcc32.cfg file to hold all your configuration for the build.

RLINK32 can signify duplicate resource so consider renaming one of the forms so as to avoid the clash. Having said that hopefully the library path should resolve the issue.

瞳孔里扚悲伤 2024-10-12 19:56:20

当您从枚举类型中删除一个值并且该值正在 dfm 中使用时,我已经看到过这种情况发生。下次打开 dfm 时,IDE 会将垃圾文本放入该值所在的位置。 Delphi 2010 如果有帮助的话。

我只需在文本编辑器中打开 dfm 并删除损坏的文本。

I've seen this happen when you remove a value from an enum type and that value was being used in the dfm. The next time you opened the dfm the IDE would put garbage text in where the value was. Delphi 2010 if that helps.

I would just open the dfm in a text editor and remove the corrupt text.

默嘫て 2024-10-12 19:56:20

我在遇到同样的问题后发现了这一点,如果我更改了添加复制组件的一些代码,该问题似乎会不时随机发生,这次我所做的唯一区别是将 = 更改为<> 但是把它改回来工作得很好,除了现在我改变了其他东西,它又发生了 - 这就是我发现这个的原因。作为一个新手,我并不真正理解这里提到的其他一些内容,但我只是发现在按 F9 之前先构建项目似乎可以工作..至少现在是这样。

希望这对某人有帮助! :)

I found this after having the same problem which seemed to happen randomly from time to time if I changed a bit of code of added a copied a component, this time the only difference I made was changing an = to <> but changing it back worked fine except now I've changed something else it's happening again - hence the reason how I found this. Being quite a newb I didn't really understand some of the other bits mentioned here but I just found by building the project first before pressing F9 seemed to work.. just for now at least.

Hope this helps someone! :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文