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. sockets - chat server console program from articles - in mfc with error

sockets - chat server console program from articles - in mfc with error

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminhelplounge
4 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.
  • S Offline
    S Offline
    simon alec smith
    wrote on last edited by
    #1

    I am trying to port a console chat server program to mfc from the articles when I declare /////////////////////// SOCKET m_SClient; SOCKET m_SListenClient; // socket listening for client calls ///////////////////// I get the following, am i missing an include unresolved external symbol __imp__listen@8 symbol __imp__bind@12 d external symbol __imp__socket@12 unresolved external symbol __imp__htons@4 unresolved external symbol __imp__WSAStartup@8 unresolved external symbol __imp__accept@12 unresolved external symbol __imp__send@16 unresolved external symbol __imp__recv@16 LNK1120: 8 unresolved externals

    CPalliniC M 2 Replies Last reply
    0
    • S simon alec smith

      I am trying to port a console chat server program to mfc from the articles when I declare /////////////////////// SOCKET m_SClient; SOCKET m_SListenClient; // socket listening for client calls ///////////////////// I get the following, am i missing an include unresolved external symbol __imp__listen@8 symbol __imp__bind@12 d external symbol __imp__socket@12 unresolved external symbol __imp__htons@4 unresolved external symbol __imp__WSAStartup@8 unresolved external symbol __imp__accept@12 unresolved external symbol __imp__send@16 unresolved external symbol __imp__recv@16 LNK1120: 8 unresolved externals

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      As stated by the documentation (see, for instance, [^]), you must link with ws2_32.lib library. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      S 1 Reply Last reply
      0
      • CPalliniC CPallini

        As stated by the documentation (see, for instance, [^]), you must link with ws2_32.lib library. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        S Offline
        S Offline
        simon alec smith
        wrote on last edited by
        #3

        thanks

        1 Reply Last reply
        0
        • S simon alec smith

          I am trying to port a console chat server program to mfc from the articles when I declare /////////////////////// SOCKET m_SClient; SOCKET m_SListenClient; // socket listening for client calls ///////////////////// I get the following, am i missing an include unresolved external symbol __imp__listen@8 symbol __imp__bind@12 d external symbol __imp__socket@12 unresolved external symbol __imp__htons@4 unresolved external symbol __imp__WSAStartup@8 unresolved external symbol __imp__accept@12 unresolved external symbol __imp__send@16 unresolved external symbol __imp__recv@16 LNK1120: 8 unresolved externals

          M Offline
          M Offline
          Moak
          wrote on last edited by
          #4

          Additional to what Pallini said, here are two good resources to start at: http://beej.us/guide/bgnet/[^] http://tangentsoft.net/wskfaq/[^] Hope it helps :)

          My webchat in Europe :java:

          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