Results 1 to 2 of 2

Thread: error LNK2001

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    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

  2. #2
    Zaei
    Guest
    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
  •  



Click Here to Expand Forum to Full Width