LNK2001: unresolved external symbol "void __cdecl free(void *)" (?free@@$$J0YAXPAX@Z)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have created a project in VC.NET. The C++ code calls malloc, free, and ZeroMemory. When I compile the project, I got linking error

TokenProcessor error LNK2001: unresolved external symbol "void __cdecl free(void *)" (?free@@$$J0YAXPAX@Z
TokenProcessor error LNK2001: unresolved external symbol "void * __cdecl malloc(unsigned int)" (?malloc@@$$J0YAPAXI@Z
TokenProcessor error LNK2001: unresolved external symbol "void * __cdecl memset(void *,int,unsigned int)" (?memset@@$$J0YAPAXPAXHI@Z
TokenProcessor fatal error LNK1120: 3 unresolved external

Anyone can help me with this issue

Thanks
Qiao
 
Under Properties/Linker/Input/Additional Dependencies

Add msvcrt.lib (release)
msvcrtd.lib (debug)



--
Yves Tourchot

(ROT13 & rem spam filter to reply)
(e-mail address removed)


Qiaoni said:
Hi,
I have created a project in VC.NET. The C++ code calls malloc, free, and
ZeroMemory. When I compile the project, I got linking error:
TokenProcessor error LNK2001: unresolved external symbol "void __cdecl
free(void *)" (?free@@$$J0YAXPAX@Z)
TokenProcessor error LNK2001: unresolved external symbol "void * __cdecl
malloc(unsigned int)" (?malloc@@$$J0YAPAXI@Z)
TokenProcessor error LNK2001: unresolved external symbol "void * __cdecl
memset(void *,int,unsigned int)" (?memset@@$$J0YAPAXPAXHI@Z)
 
Back
Top