Hi All,
I'm trying to create a library file,
From the main library file (.lpr), I can access the variables within the units.
library Project1;
{$mode objfpc}{$H+}
uses
Classes, unit1;
{$R *.res}
var
library_variable:integer;
begin
unit_variable:=2021;
end.
But;
I cannot access the variables in the main library file (.lpr) from within the units.
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
var
unit_variable:integer;
implementation
procedure acces_lpr_variable_test;
begin
library_variable:=1999; // I want to access the variable from here.
end;
end.
What route should I follow to access the variable?
I would be very glad if anyone could help. Respects.