hello guys, I got some bug on library project. When I uses Lazarus 0.9.28.2 I write this code and work well, then I recompile it use Lazarus 1.0.2 and 1.0.4 and got this error....
Project project_test raised exception class 'External: SIGEGV'. At address 7C91B1FA
I have 2 project
??? first project is library project...
Here is the code for first project
function test(_str:string):string; cdecl; export;
implementation
function test(_str:string):string; cdecl; export;
var
? _i,_l,_k,_d:integer;
? _h:string;
? _char:Char;
begin
? if _str'' then
? begin
??? _l:=length(_str);
??? //SetLength(_h,_l);
??? _h:=_str;
??? _char:='t';
??? _h[1]:=_char;
? end else _h:='';
? Result :=_h;
end;
?Then second project is application project.
I got 1 button to execute function in the library project. Here is the code.
? function test(_str:string):string; cdecl; external 'project1.dll' name 'TEST';
var
? Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
? ShowMessage(test('alex'));
end;??
I got that error when I click the button.
If I delete this selection, It work well
??? _h[1]:=_char;
=============INTOSOFT============
ALEXIO CHAOS
Yahoo Messager
=================================