如何在Delphi XE中打开并编译Delphi 5项目?
是否有 IDE 可以打开旧版 Delphi 5 项目?
Delphi XE似乎不支持delphi 5。
Is there an IDE to open a legacy Delphi 5 project?
The Delphi XE seems doesn't support delphi 5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它将打开 D5 *.dpr 并创建一个 .dproj 文件(除了其他文件)来配置默认环境。
如果您有报表,可能您需要获取 QuickReport 用户许可证,附带的最新版本是 Delphi 7。
然后是 Unicode 转换(这可能非常困难,也可能非常容易,具体取决于代码库)。
It'll open the D5 *.dpr and create an .dproj file (besides other files) to configure the default environment.
If you have reports, probably you need to acquire an QuickReport user license, the last version that came with it was Delphi 7.
And after that - the Unicode conversion (which can very difficult or very easy, depending of the codebase).
Delphi 5 和 XE 之间发生了很多变化。
其中最大的一个是 Unicode 字符串。
您需要更改代码来处理此问题。 Stack Overflow 上还有许多其他问题涉及此主题。
除此之外,从一个版本升级到另一个版本需要的不仅仅是打开和编译。进一步澄清您遇到的问题将有助于完善您问题的答案。
以下是我在升级时通常执行的步骤。
删除源目录中的所有 DCU、DCP 和 BPL 文件。
如果您设置了明确定义的输出目录,通常您只需更改输出目录即可。
安装/升级新版本Delphi中的所有组件
注意一些以前默认安装的组件(示例QuickReport和Decision Cube)在默认安装中并不存在。 Decision Cube 仍然发布,但现在位于演示目录中。 QuickReport 不再是产品的一部分。
您可能还拥有需要升级的第 3 方组件。
打开项目,验证每个表单和数据模块将打开且没有错误
这些错误往往表明您未安装组件和/或组件的接口已更改。无论哪种方式,如果您阅读并遵循错误消息,您应该
能够解决这些问题。
构建您的项目
修复所有编译错误。如果您在代码中使用了
$IFDEF VERXXX
,您可能需要更改此逻辑以适应新版本。解决所有警告。编译器警告通常指出可能会破坏的错误代码。 Delphi 的每个版本通常都会引入一些新警告。例如忽略
字符串警告很可能会导致您的应用程序行为不正确。
Many things have changed between Delphi 5 and XE.
One of the biggest is Unicode Strings.
Your code will need to change to handle this. There are many other Questions here on Stack Overflow that cover this topic.
In addition to this change upgrading from version to version requires a bit more than just open and compile. Further clarification on the problem you are having would help refine the answers to your question.
Here are the steps I typically go through when upgrading.
Remove all DCU, DCP and BPL files that are in your source directories.
If you have setup well defined output directories typically all you have to do is change your output directory.
Install/Upgrade all components in the new version of Delphi
Heads up some components (Example QuickReport and Decision Cube) that were installed by default before, don't exist in the default installation. Decision Cube still ships but is now in the demos directory. QuickReport is no longer part of the product.
You also may have had 3rd Party components that need to be upgraded.
Open Project, verify each form and datamodule will open without errors
These errors tend to indicate that you have a component not installed and/or the interface of the component changed. Either way if you read and follow the error messages you should be
able to work through these.
Build Your project
Fix any compile errors. If you have used
$IFDEF VERXXX
in your code you may need to change this logic to be correct with the new version.Resolve all warnings. Compiler warnings typically point out bad code that may break. Each version of Delphi typically introduces a few new warnings. For example ignoring
the string warnings will most likely cause your application to behave incorrectly.