Hi,
I downloaded the LAZBARCODE tarball but didn't install the package into Lazarus.
Instead I want to only use the code at runtime.
The compiler gives me back four errors in zint.pas:
..\lazbarcodes\src\zint.pp(47,33) Error: Type "zint_render_line" is not completely defined
..\lazbarcodes\src\zint.pp(61,35) Error: Type "zint_render_string" is not completely defined
..\lazbarcodes\src\zint.pp(72,33) Error: Type "zint_render_ring" is not completely defined
..\lazbarcodes\src\zint.pp(81,36) Error: Type "zint_render_hexagon" is not completely defined
..\lazbarcodes\src\zint.pp(242,1) Fatal: There were 4 errors compiling module, stopping
Which settings in the compiler are required to make it compile ?
Thanks,
Peter
The component was designed working with fpc 2.5.1 version, prior ones have a problem when define a record which have a pointer definition to itself as a field. The solution is quite easy, just simple reorder some definitions, instead:
type
zint_render_line = record
x : single;
y : single;
length : single;
width : single;
next : ^zint_render_line;
end;
PointerTo_zint_render_line=^zint_render_line;
PointerTo_PointerTo_zint_render_line=^PointerTo_zint_render_line;
It should be defined as:
---------------------------------
type
PointerTo_zint_render_line=^zint_render_line;
PointerTo_PointerTo_zint_render_line=^PointerTo_zint_render_line;
zint_render_line = record
x : single;
y : single;
length : single;
width : single;
next : PointerTo_zint_render_line; // ^zint_render_line;
end;
----------------------------
So pointers are defined first and then the record.
I'll attach by now a modified zint.pp (thanks to Igor Z for fixing the problem).
Changes commited in SVN Rev 2125
Thanks for very fast replay.
It compiles now, as You described - thanks !!