Thread: Error Linking...

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    36

    Error Linking...

    Does anyone know how to get rid of this error and where it comes from?

    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/Programming_Project_2.exe : fatal error LNK1120: 1 unresolved externals

    What I did was transfer my code from another computer to my home computer, and I keep getting this error. I never received this message on the other PC. I checked my code and everything is fine.

    Any ideas would be great. Thanks.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >Does anyone know how to get rid of this error and where it comes from?
    It looks like you have your compiler options set to build a Windows program. You should change your options to build a Console program.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    symbol _WinMain
    What type of program did you copy?? Do you know the difference between a Windows program and a Win32 Console Application? They are completely different, and it looks like you might have a Windows program pasted into a Win32 Console Application or vice versa. If the program you copied has something like this somewhere:
    Code:
    int main()
    {
    
         //code
    
        return 0;
    }
    Then, it needs to be pasted into a win32 Console Application.

  4. #4
    Registered User
    Join Date
    Apr 2005
    Posts
    36
    Ah, stupid mistake. Thanks.

Popular pages Recent additions subscribe to a feed