Discussion:
Internal Error L3118 when I try to compile my delphi project with obj file
(too old to reply)
Nathan Baker
2010-08-14 19:21:54 UTC
Permalink
Hi to all!!!
My problem is "Internal Error: L3118", which arises when I try to
Maybe someone in 'comp.lang.pascal.delphi.misc' knows what that error number
means??
compile my obj file (which assembled in TASM5.0) with my Delphi
project. This error is so unusual because it's arises not in every
time when I try to compile my delphi project which I making in
Delphi7.1 with obj file assembled in TASM5.0.
I dont know why that error arises, because I don't do in assembler
something unusual.
Please if anyone now how to solve that's problem write how.
Unit1.pas
****************************************************************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label4: TLabel;
Button2: TButton;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure EspNum();STDCall;EXTERNAL;
Procedure WordIn();STDCall;EXTERNAL;
{$L StackOut1}
var
Form1: TForm1;
ESPV: DWord;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
EspNum();
Label1.Caption:=IntToStr(ESPV);
WordIn();
Label4.Caption:=IntToStr(ESPV);
end;
end.
********************************************************************
StackOut1.asm
********************************************************************
Title StackOut for 32 bit
.486P
.MODEL flat, STDCall
;PUBLIC StackOut
PUBLIC WordIn
PUBLIC EspNum
.Data
EXTRN ESPV: DWORD
a32 DD ?
b32 DD ?
c32 DD ?
d32 DD ?
.CODE
WordIn proc
mov a32,eax
mov eax,110
push ax
push esp
pop eax
mov ESPV,eax
pop ax
mov eax,a32
ret
WordIn ENDP
EspNum proc
mov a32,eax
push esp
pop eax
mov ESPV,eax
mov eax,a32
ret
EspNum ENDP
END
********************************************************************
That's project is can't to be compiled because compiler show Error
L3118
Unit1.pas
*********************************************************************
unit UNIT1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure Movl(); STDCall; EXTERNAL;
{$L MOV_32.obj}
var
Form1: TForm1;
x:longint;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Movl();
Edit1.Text:=IntToStr(x);
end;
end.
**************************************************************
Mov_32.asm
**************************************************************
Title move for 32 bits
.386P
.MODEL FLAT, stdcall
PUBLIC Movl
.DATA
extrn x: DWORD
a DD 64h
.CODE
Movl proc
mov ax,WORD PTR a ;ax<=== low word of a
push bx
mov bx,WORD PTR a+2 ;bx<=== high word of a
mov WORD PTR x,ax ;low word of x<=== ax
mov WORD PTR x+2,bx ;high word of x<=== bx
pop bx
ret
Movl ENDP
END
***********************************************************************
So please if you know how to solve this problem mail me.
Maarten Wiltink
2010-08-15 10:04:40 UTC
Permalink
Post by Nathan Baker
My problem is "Internal Error: L3118", which arises when I try to
Maybe someone in 'comp.lang.pascal.delphi.misc' knows what that error
number means??
No, but Google usually knows.

Internal errors in Delphi are not very useful. They're generally
triggered by something specific in the source, something that is _not_
wrong, and can often be 'solved' by doing things just slightly
differently, or building instead of compiling.

Groetjes,
Maarten Wiltink
Andrew Gabb
2010-08-21 06:50:31 UTC
Permalink
Post by Maarten Wiltink
Internal errors in Delphi are not very useful. They're generally
triggered by something specific in the source, something that is _not_
wrong, and can often be 'solved' by doing things just slightly
differently, or building instead of compiling.
I agree. I normally use the command line compiler when not actually
debugging. When I get one of these I know it's time to go and compile it
in the IDE. Or do a build as you say.

Andrew
--
Andrew Gabb
email: ***@tpgi.com.au Adelaide, South Australia
phone: +61 8 8342-1021
-----
Loading...