Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Error in socket program .

Error in socket program .

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harshadha
    wrote on last edited by
    #1

    Hai, Iam getting this errors when i compile it. error C2065: 'WSAAsyncGetHostByName' : undeclared identifier error C2065: 'WSACancelAsyncRequest' : undeclared identifier Note: I got this error previosly before some days and posted it here some them are replied to include winsock.h,winsock2.h.But it doesnt rectified, iam working in another project in that iam getting the same error.Can anyone please suggest me how to rectify it. Thanks in Advance Harshadha

    H D 2 Replies Last reply
    0
    • H harshadha

      Hai, Iam getting this errors when i compile it. error C2065: 'WSAAsyncGetHostByName' : undeclared identifier error C2065: 'WSACancelAsyncRequest' : undeclared identifier Note: I got this error previosly before some days and posted it here some them are replied to include winsock.h,winsock2.h.But it doesnt rectified, iam working in another project in that iam getting the same error.Can anyone please suggest me how to rectify it. Thanks in Advance Harshadha

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Whats your compiler and application type?


      WhiteSky


      1 Reply Last reply
      0
      • H harshadha

        Hai, Iam getting this errors when i compile it. error C2065: 'WSAAsyncGetHostByName' : undeclared identifier error C2065: 'WSACancelAsyncRequest' : undeclared identifier Note: I got this error previosly before some days and posted it here some them are replied to include winsock.h,winsock2.h.But it doesnt rectified, iam working in another project in that iam getting the same error.Can anyone please suggest me how to rectify it. Thanks in Advance Harshadha

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        harshadha wrote:

        error C2065: 'WSAAsyncGetHostByName' : undeclared identifier error C2065: 'WSACancelAsyncRequest' : undeclared identifier

        You must include Winsock2.h in order to use these functions.

        harshadha wrote:

        But it doesnt rectified,

        Then you are doing something else wrong. What does your stdafx.h file look like?


        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups