|
-
Mar 5th, 2002, 03:35 PM
#1
Thread Starter
Addicted Member
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++
Zvonko Bostjancic
Ilirska Bistrica, Slovenia
[email protected]
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
-
Mar 5th, 2002, 07:38 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|