Il 25/01/2010 15.40, zeljko ha scritto:
Hi all,
I've already filled up an issue
http://bugs.freepascal.org/view.php?id=15586 which shows the problem.
It cannot link application with> 255 lfms (mac only - win32& linux are ok).
fpc-2.4.1 r14802
Anyone ?
Could you please make a test with the code below?
Put the attached program in a new folder (since it creates a lot of
files), then compile the program from the Terminal with
fpc genres.pas
It will create 260 small .lfm files and a test.pas file.
try to compile test.pas with
fpc test.pas
And report the error message you receive.
I want to understand if it is fpc, fpcres or the linker who complains.
Giulio
cut and paste the text below in a genres.pas file
----------------------------------------------------------------------
program genres;
{$mode objfpc}{$h+}
uses
classes, sysutils;
procedure genfile(i : integer; prog : TStringList);
var
str : TStringList;
nstr : string;
begin
nstr:=IntToStr(i);
str:=TStringList.Create;
str.add('object AboutForm'+nstr+': TAboutForm'+nstr);
str.add('end');
str.SaveToFile('res'+nstr+'.lfm');
str.Free;
prog.Add('{$R res'+nstr+'.lfm}');
end;
function progstart : TStringList;
var
str : TStringList;
begin
str:=TStringList.Create;
str.Add('program test;');
str.Add('');
Result:=str;
end;
procedure progend(str : TStringList);
begin
str.Add('');
str.Add('begin');
str.Add('end.');
str.SaveToFile('test.pas');
str.Free;
end;
var
i : integer;
str : TStringList;
begin
str:=progstart;
for i:=1 to 260 do
genfile(i,str);
progend(str);
end.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel