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