Forum > Packages and Libraries

Installation of Graphics32 compile fails

(1/3) > >>

jkorten:
I have downloaded the graphics32 an want to use it, given how slow the default Tbitmap operations are, but the install fails with the message: unkown identifier. It points to a portion of assembler code highlighting the variable "SrcPoint.X" as unknown.

{$IFNDEF TARGET_x86}
begin
  DstPoint.X := (SrcPoint.X + $7F) div 256;
  DstPoint.Y := (SrcPoint.Y + $7FFF) div 65536;
{$ELSE}
asm
    MOV ECX, [SrcPoint.X]
    ADD ECX, $0000007F
    SAR ECX, 8 // sub-sampled
    MOV [DstPoint.X], ECX
    MOV EDX, [SrcPoint.Y]
    ADD EDX, $00007FFF
    SAR EDX, 16
    MOV [DstPoint.Y], EDX
{$ENDIF}     


And when I comment out the ifdefs to compile the pascal code instead it knows about SrcPoint.X

Is there a compiler switch I need to make in order to allow Lazarus to know about variable names in assembler code?

Thanks for your help.

Jerry

jkorten:
OK if nobody else replies to my post I will. So I undefined TARGET_x86 to avoid the error. Now I only have an error on install that it does not know where GR32_blend is.

I will keep you posted (I know this is exciting).

Thanks

BigChimp:
Hi jkorten,

Thanks for posting your solution - that might help other people that find this post...

Don't know if graphics32 is in the Lazarus CCR repository; if it is, please file a bug report with the information in your posts (including Lazarus, FPC version, operating system, version/date of graphics32).
This will make it MUCH more likely that the developers will see this and fix it.

If graphics32 is not in Lazarus or Lazarus CCR, I'd suggest you file a bug with the author...

Thanks,
BigChimp

felipemdc:
Some years ago I ported Graphics32 to Lazarus so if you get their very latest source code it should work. Last time I looked their last release was ages ago, so a snapshot or something like that would be a better choice. But I haven't used it in years, so I can't say much for sure.

jkorten:
 :)

OK the complete install works on a windows installation when you do the following:

1) Open the file GR32_Polygons.pas and insert a line {UNDEF TARGET_x86} after the  {$I GR32.inc} directive.
2) choose package->open package file and choose the GR32_DSGN_L.lpk file and compile.
3) before installing - open the GR32_L.PAS file and change the "unit gr32_l" to "unit gr32_l.pas" hit file save.
4) open the GR32_DSGN_L.PAS and chang ethe "unit GR32_DSGN_L" line to "unit GR32_DSGN_L.PAS" and hit file save
5) now click the "use" (which will install the package in lazarus by recompiling the GUI.

The gr32_dsgn_l file will be changed back by the compiler again and so will the gr32_l file but this is how you get the fpc compiler to know about the various unit dependencies I guess.

This seems like a Lazarus package install bug more than a graphics32 issue - can anybody comment?

Thanks

Jerry

Navigation

[0] Message Index

[#] Next page

Go to full version