CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Posts
    17

    fatal error LNK1136: invalid or corrupt file

    Hi,
    i am trying to do socket programming in vc++ under windows 2000.
    i had included <windows.h> in my program..when i build my project i am getting the the following exception..

    C:\Program Files\Microsoft Visual Studio\VC98\LIB\winsock.lib : fatal error LNK1136: invalid or corrupt file

    could any body tell me the reason.

    Thanks in advance..

    --sreeny




  2. #2
    Join Date
    Aug 1999
    Location
    Canada
    Posts
    2,076

    Re: fatal error LNK1136: invalid or corrupt file

    Try this :

    /* Prevent inclusion of winsock.h in windows.h */
    #ifndef _WINSOCKAPI_
    #define _WINSOCKAPI_
    #endif
    #include <windows.h>

    and link ws2_32.lib. No winsock.lib. This library doesn't exist.




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

Featured