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

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
 
Y

Yves Tourchot

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top