Jump to content
sjubussen

CCR.Exif with lots of errors.

Recommended Posts

As a retired developer i'm a bit rusty (71 years) , and now i have run into a problem. I created a small windowsapplication using Delphi community edition 10.4 (i think) on Windows 10. The CCR.Exif worked perfectly.  Since then i have upgraded to Windows 11 and to Delphi 11 build 3. Now when i try to compile my project i get a lot of errors on CCR.Exif files. Here it seems that the CCR.Exif is not recognised (Pic1). Then i tried to create a small application and added all CCR files to the project. This gave me the error in Pic2. I hope there might be a simple solution to this and someone can help? Please?

Pic1.png

Pic2.png

Share this post


Link to post

It is easier if you paste a text instead a picture. they have changed the signature of the Realloc method:

function TMemoryStream.Realloc(var NewCapacity: NativeInt): Pointer;
 

  • Thanks 1

Share this post


Link to post
5 hours ago, Lajos Juhász said:

I will remember that. Thanks a lot for your reply. Your suggestion fixed the problem in my testapplication where the CCR files are added to the project. But i still get a error in my main application as seen in picture 1. Is there a path or something i have to set for the compiler to recognize the ccr library? 

 

 


 

 

Share this post


Link to post

All the CCR realted files should be in the project directory, or you must add the path lib where these files are located (in the project options or in the tool/language/ Delphi options).

 

If the CCR is a standalone project group (runtime o designtime) you must build it after the changes (and the path that you should use is the path where the CCR project group save the DCU files).

If the CCR is only a set of Pascal source, your path lib must be the path where the sources are located.

 

Bye

 

image.thumb.png.74bee9e243569cd0b2e7ceb940973e81.pngimage.thumb.png.6352c7d929176f27aa18561c5d220e66.png

  • Thanks 1

Share this post


Link to post

In file CCR.Exif.BaseUtils.pas you have to change the following lines:

 

From

     

function Realloc(var NewCapacity: Longint): Pointer; override;

To

     

 function Realloc(var NewCapacity: {$IF CompilerVersion >= 35}NativeInt{$ELSE}LongInt{$IFEND}): Pointer; override;
{$IF CompilerVersion < 33} protected {$ELSE} public {$IFEND}

 

And From

 

 function TMetadataBlock.TDataStream.Realloc(var NewCapacity: Longint): Pointer;

To

 

function TMetadataBlock.TDataStream.Realloc(var NewCapacity: {$IF CompilerVersion >= 35}NativeInt{$ELSE}LongInt{$IFEND}): Pointer;

 

Edited by GPRSNerd
  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×