This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: linking programs with winsock API - Problems
krishna_unf@bellsouth.net wrote:
> I am new to using the winsock programs. I am having problem in creating the runtime binaries using the socket programming with winsock API.
>
> The error message received on the console is :- cannot find -lwinsock32
If you are compiling a _cygwin_ program and use standard posix socket
functions there is no need for -lanything because all of the socket
functions are handled by the Cygwin DLL.
If you are compiling a mingw application (i.e. you include -mno-cygwin
on your gcc command line) then you will have to add -lws2_32 or
-lwinsock. However, "winsock32" is not the name of any valid mingw
library so that will not work.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/