简体   繁体   English

带有Delphi 10.1 Berlin的GraphicEx

[英]GraphicEx with Delphi 10.1 Berlin

I installed GraphicEx (a Delphi image loader library) in Delphi 7, and it worked fine. 我在Delphi 7中安装了GraphicEx (一个Delphi图像加载器库),并且运行良好。

Now, when I try to install it in Delphi 10.1 Berlin, I get errors: 现在,当我尝试在Delphi 10.1 Berlin中安装它时,出现错误:

[dcc32 Error] JPG.pas(1136): E2065 Unsatisfied forward or external declaration: 'jpeg_reset_huff_decode' 
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '@jfwrite'
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '@jfflush'
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '@jfread'
[dcc32 Fatal Error] GraphicEx.pas(613): F2063 Could not compile used unit 'JPG.pas'

So, how can I use GraphicEx in Delphi 10.1 Berlin? 那么,如何在Delphi 10.1 Berlin中使用GraphicEx?

As described on the page to which you link, this library has not been updated to the latest versions of Delphi. 如您链接到的页面上所述,该库尚未更新为最新版本的Delphi。 However, you will most likely find that you do not need it any more. 但是,您很可能会发现您不再需要它。 Recent Delphi versions have out of the box support for JPEG and PNG images formats. 最新的Delphi版本已经开箱即用地支持JPEG和PNG图像格式。

Resolve your problem by removing references to this library and using the built in image format support. 通过删除对此库的引用并使用内置的图像格式支持来解决您的问题。

If you are using the library for the more esoteric image formats that it offers then you will need to update it to work with the your version of Delphi. 如果您正在使用该库提供的更深奥的图像格式,则需要对其进行更新以与您的Delphi版本一起使用。

In the first instance, the compilation errors that you report are simply down to your not having added the necessary folders to your search path. 在第一种情况下,您报告的编译错误只是由于您没有在搜索路径中添加必要的文件夹。 The object files that define those functions are found in the 3rd party\\LibJPG\\obj folder. 定义这些功能的目标文件位于3rd party\\LibJPG\\obj文件夹中。 You must add that to your search path. 您必须将其添加到搜索路径。 When you do that you will get another error. 当您这样做时,您将得到另一个错误。 Keep resolving them one by one. 继续一一解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM