Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WSASocket(....) causing unresolved external symbol __imp__WSASocketA@2

Status
Not open for further replies.

ADoozer

Programmer
Dec 15, 2002
3,487
AU
the code compiles perfectly until i add the following line

Code:
sock=WSASocket(AF_INET, SOCK_RAW,IPPROTO_IP,NULL,0,WSA_FLAG_OVERLAPPED);

after i add that line and compile, i get 2 errors

Creating library Object___Win32_Final/Object.lib and object Object___Win32_Final/Object.exp
MultiplayerIPBan.obj : error LNK2001: unresolved external symbol __imp__WSASocketA@24
final\Object.lto : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

i cannot see how this would cause an issue as i have the code working in another project.

any help appreciated.

If somethings hard to do, its not worth doing - Homer Simpson
 
never mind..

added

Code:
#pragma comment(lib, "ws2_32.lib")

and it compiles now....

If somethings hard to do, its not worth doing - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top