[Lazarus] IDE complains about missing Register procedure.

Donald Ziesig donald at ziesig.org
Thu Apr 27 23:52:05 CEST 2017


Well, I found a bug in Lazarus 1.9 that I thought went away with Lazarus 
1.2.

I am in the process of refactoring the code from libraries I created in 
Delphi back in the early 1990's (I learned a lot since then :-D).

I created a package, and copied a previously working component's .pas 
file into its directory, then added it to the package itself.  The 
Package compiles with no errors.

When I clicked on Use | Install, I got the error message:

/The package arsmagicagui does not have any "Register" procedure, which 
typically means, it does not provide any IDE addon. Installing it will 
probably only increase the size of the IDE and may even make it unstable./

Within the component code I have:

procedure Register;

implementation

uses
   LazLogger,
   Math;

procedure Register;
begin
   RegisterComponents('Ars Magica',[TAMFormPanel]);
end;

Within the package code I have:

uses
   AMFormPanel, LazarusPackageIntf;

implementation

procedure Register;
begin
   AMFormPanel.Register;// I added this.  It did not change the error.
end;

initialization
   RegisterPackage('arsmagicagui', @Register);
end.

Years ago, I remember getting this error while I was first experimenting 
with Lazarus, but it went away (not sure why) and I have been able to 
create many components in the intervening time.

What did I do wrong? :-[

Thanks,

Don Ziesig


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170427/c17457bc/attachment.html>


More information about the Lazarus mailing list