For Programmers: Free Programming Magazines  


Home > Archive > VC Language > January 2006 > WSCEnumProtocols link error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author WSCEnumProtocols link error
yedong2005@gmail.com

2006-01-25, 7:23 pm

Hi,

I am using visual studio 8 to build a c program to generate x64 64-bit
binary.

The compilation goes through without error.

When it comes to link, it reports the following two errors:
myWin32socket.obj: error LNK2019: unresolved external symbol
WSCEnumProtocols referenced in function open_socket
myWin32socket.obj : error LNK2019: unresolved external symbol
__imp_WSASocketA referenced in function open_socket
myProgram.exe: fatal error LNK1120: 2 unresolved externals

I checked out the MSDN library to lookup this function WSCENumProtocols
and got back to my source code, it did include the header file
Ws2spi.h.
Can someone point me to where things could go wrong?

Thanks in advance

Dong

Igor Tandetnik

2006-01-25, 7:23 pm

yedong2005@gmail.com wrote:
> I am using visual studio 8 to build a c program to generate x64 64-bit
> binary.
>
> The compilation goes through without error.
>
> When it comes to link, it reports the following two errors:
> myWin32socket.obj: error LNK2019: unresolved external symbol
> WSCEnumProtocols referenced in function open_socket
> myWin32socket.obj : error LNK2019: unresolved external symbol
> __imp_WSASocketA referenced in function open_socket
> myProgram.exe: fatal error LNK1120: 2 unresolved externals
>
> I checked out the MSDN library to lookup this function
> WSCENumProtocols and got back to my source code, it did include the
> header file Ws2spi.h.


One line below it says

Link to Ws2_32.lib

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com