This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Can't link to winsock2 library
- From: Brian Ford <ford at vss dot fsi dot com>
- To: Takeshi Honda <moecho21 at yahoo dot co dot jp>
- Cc: cygwin at cygwin dot com
- Date: Fri, 24 Oct 2003 12:51:30 -0500 (CDT)
- Subject: Re: Can't link to winsock2 library
- References: <20031024174737.77532.qmail@web302.mail.yahoo.co.jp>
On Sat, 25 Oct 2003, Takeshi Honda wrote:
> What can I do for this problem?
> Please let me know.
>
> ext>>gcc -Os -I /usr/local/lib/ruby/1.6/i386-cygwin -I.
> -I/usr/local/lib/ruby/1.8/i386-cygwin
> -I/usr/local/lib/ruby/1.8/i386-cygwin -I.
> -I/usr/local/cygwin-local/include -c Sniff.cpp -lws2_32
> -lm -lstdc++
> gcc: -lws2_32: linker input file unused because linking
> not done
> gcc: -lm: linker input file unused because linking not
> done
> gcc: -lstdc++: linker input file unused because linking
> not done
>
The -c option means compile just a .o file. Libraries are only used
during the final link. Remove the -c, and you'll probably want a -o to
specify the output file name.
Your include path looks weird. Two versions of ruby?
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
--
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/