Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find lazutf8classes #201

Closed
lainz opened this issue Jun 16, 2023 · 21 comments
Closed

Cannot find lazutf8classes #201

lainz opened this issue Jun 16, 2023 · 21 comments

Comments

@lainz
Copy link
Member

lainz commented Jun 16, 2023

bgrautf8.pas(10,72) Error: Cannot find lazutf8classes used by BGRAUTF8 of package BGRABitmapPack.
https://forum.lazarus.freepascal.org/index.php/topic,63673.msg482696.html#msg482696

@fredvs
Copy link
Member

fredvs commented Jun 16, 2023

Maybe reconsider this?: #139

@DomingoGP
Copy link
Contributor

Hi

With this patch the package compiles with lazarus trunk, also replaces the deprecated UTF8CharacterLength

Regards
Domingo.

utf8.patch

@afriess
Copy link

afriess commented Jun 22, 2023

If the patch is ok, can the OPM please updated.

@Shebuka
Copy link

Shebuka commented Jun 23, 2023

@DomingoGP can you create a PR with this patch applied?

@DomingoGP
Copy link
Contributor

Created.

Circular feel free to close the pull request if you prefer to solve the issue in a different way.

@circular17
Copy link
Contributor

Ok I applied your patch, thanks!

@circular17
Copy link
Contributor

If the patch is ok, can the OPM please updated.

Yes, I will wait for people to confirm it is all okay.

@circular17
Copy link
Contributor

Maybe reconsider this?: #139

LazUtils is still needed for FreeType

@circular17
Copy link
Contributor

By the way, I've also done some minor adjustments to reduce the number of compilation warnings.

@afriess
Copy link

afriess commented Jun 25, 2023 via email

@circular17
Copy link
Contributor

I've been able to compile as well with Lazarus 2.2.6 and FPC 3.2.2

@circular17
Copy link
Contributor

I've added a compilation directive, but that's not great, because it relies on manually adjusting bgrabitmap.inc:

uses
  LazVersion, BGRAClasses, SysUtils, math, BGRAUnicode
  {$IFDEF BGRABITMAP_USE_LCL},
    {$IFDEF BGRABITMAP_USE_LCL22}
      classes
    {$ELSE}
      LazUTF8Classes
    {$ENDIF}
  {$ENDIF}; 

I've tried using LazVersion unit, but the const does not seem to be defined in the uses clause.

@DomingoGP
Copy link
Contributor

I've tried using LazVersion unit, but the const does not seem to be defined in the uses clause.

Unfortunately, it seems that it is not defined within the uses.
This new patch partially reverts the first patch and is more backwards compatible with older lazarus versions but still needs to manually modify bgrabitmap.inc :-(

utf8_2.patch

@CardanoDVPR
Copy link

I find myself in this situation and have never applied a .patch file. Can someone outline the process for getting BGRABitmap to compile and make usable within FP and Lazarus please? I apologize for being uninformed about this. Can't find this .patch process (or is this only for github use--but then I still don't know how to get BGRABitmap working for me).

@circular17
Copy link
Contributor

Hello CardanoDVPR. Which version of Lazarus are you using?

@CardanoDVPR
Copy link

Lazarus version 3.99, Free Pascal version 3.3.1.

@circular17
Copy link
Contributor

Ok so probably you can use dev-bgrabitmap branch. Do you know how to retrieve it?

@CardanoDVPR
Copy link

Yes. I have it. But now I have a new error: unibitmap.inc(2463,5) Error: Identifier not found "ResolutionUnit"

@circular17
Copy link
Contributor

Ah ok. ResolutionUnit is defined on line 529 like this:

    {$IF FPC_FULLVERSION<30301}
    //Resolution
    property ResolutionUnit: TResolutionUnit read FResolutionUnit write SetResolutionUnit;
    property ResolutionX: Single read FResolutionX write FResolutionX;
    property ResolutionY: Single read FResolutionY write FResolutionY;
    property ResolutionWidth: Single read GetResolutionWidth;
    property ResolutionHeight: Single read GetResolutionHeight;
    {$ENDIF} 

So I suppose that you have trunk version of FPC, but not the latest version of it. So I suggest either to use a stable version of FPC or to update to latest trunk.

@CardanoDVPR
Copy link

The perils of trying to stay up to date. I needed the trunk for some other functionality. Ok. Thank you for your help.

@circular17
Copy link
Contributor

Indeed. Well maybe the functionality you need is also in the latest update of trunk. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants