CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2013
    Posts
    1

    Smile adding <winsok2.h> to visual c++ 2008 express

    hi every one iam trying to write network program with vc++ (windows form application)

    but the problem is

    when iam try to include <winsock2.h> the complier give this massge:

    warning C4627: '#include "windows.h"': skipped when looking for precompiled header use
    1> Add directive to 'stdafx.h' or rebuild precompiled header


    i intalled windows sdk and Integrated the Platform SDK into my Visual C++ Express.

    the integration steps is illustrated will in the link below:

    http://eli.thegreenplace.net/2008/08...ual-c-express/


    please please help me

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: adding <winsok2.h> to visual c++ 2008 express

    Do you understand pre-compiled headers?

    Have a look at

    http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx

    and

    http://social.msdn.microsoft.com/For...er-information

    If you search msdn.microsoft.com you find a lot of info about precompiled headers. It is also a great resource for info about the visual c++ and visual studio etc.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: adding <winsok2.h> to visual c++ 2008 express

    short answer:
    add any additional includes AFTER the stdafx.h include or put them in the stdafx.h

    long anwser see above

Tags for this Thread

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