another error LNK2019

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine

i compiled my file and i have
1>dimvariabile.obj : error LNK2019: riferimento al simbolo esterno _hasty@8 non risolto nella funzione _wmain
this is my source file

#include "stdafx.h"
#include "iostream"
using std::cin;
using std::cout;
using std::endl;
extern "C" int __stdcall hasty(char *,int*);
extern "C" void __stdcall cleareg();
int _tmain(int argc, _TCHAR* argv[])
{
char stringa[70];
int lunghezza,i,d;lunghezza=0;i=0;d=0;
i = hasty (stringa,&lunghezza);
cout << "la variabile occupa " << i << " byte di memoria " << "n";
cout << "la routine occupa " << lunghezza << " byte di memoria " << "n";
cout << "premi un tasto per terminare ";
cin >>d; return 0;
}
and this is my assembler module
.486
.model flat, stdcall
option casemap:none
.data ;ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
par1 dd ? ;º vettore. º
par2 dd ? ;º futura dimensione. º
.code ;ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
externcleareg@0:near
cleareg EQUclearreg@0
hasty PROC Arg1:Dword,Arg2:Dword
a0000:
call cleareg
mov edi,Arg2
mov esi,Arg1
mov par1,esi
mov par2,edi
lea ecx,[esi]
jecx a0002
a0001:
inc eax
add ecx,4
mov edx,[ecx]
cmp edx,0
jne a0001
a0002:
inc eax
z0000:
mov ebx,a0000
mov edx,z9999
add edx,2
sub edx,ebx
add edx,10
mov dword ptr [edi],edx
z9999:
ret 8
hasty endp
end
where is the error ?
how can i remove it?

View the full article
 
Back
Top