-
error LNK2001
Hello.
I'm new in C and I allways while compiling get an error:
--------------------Configuration: Naloga1 - Win32 Release--------------------
Linking...
LIBC.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Release/Naloga1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Naloga1.exe - 2 error(s), 0 warning(s)
-------------------------------------------------------------------------------------------
Why?
P.S.: I use Visual C++
-
You are compiling a Win32 Project, but your main function is called "main". You need to change it to:
Code:
int __stdcall WinMain(HINSTANCE, HINSTANCE, char*, int)
Or recreate the project as a Win32 Console Project.
Z.