This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Problem when linking with winsock.
- To: cygwin at cygwin dot com
- Subject: Problem when linking with winsock.
- From: Rex Tsai <chihchun at kalug dot linux dot org dot tw>
- Date: Fri, 12 Oct 2001 03:47:57 +0800
- Reply-To: Rex Tsai <chihchun at kalug dot linux dot org dot tw>
Hi, all
I tried to compile "putty" (a ssh client for windows), the
objects compilation is just fine, but there is a problem
when the linking stage. Here is the error messages
btw, I'm sure that I add -lwsock32.
gcc -mwindows -lcygwin -lgcc -lstdc++ -ladvapi32 -luser32 -lgdi32
-lcomctl32 -lcomdlg32 -lshell32 -lwinmm -limm32 -lwsock32 -lkernel32
-o putty.exe -Xlinker -Map -Xlinker putty.map window.o windlg.o
winctrls.o terminal.o sizetip.o wcwidth.o unicode.o telnet.o raw.o
rlogin.o ldisc.o winnet.o misc.o version.o winstore.o settings.o
tree234.o sshcrc.o sshdes.o sshmd5.o sshrsa.o sshrand.o sshsha.o
sshblowf.o noise.o sshdh.o sshdss.o sshbn.o sshpubk.o ssh.o pageantc.o
sshzlib.o x11fwd.o portfwd.o sshaes.o sshsh512.o win_res.res
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
warning: cannot find entry symbol _WinMainCRTStartup; defaulting to
00401000
window.o(.text+0x3b6):window.c: undefined reference to `WSAStartup@8'
window.o(.text+0x3fe):window.c: undefined reference to
`InitCommonControls@0'
window.o(.text+0x88e):window.c: undefined reference to `WSACleanup@0'
window.o(.text+0x976):window.c: undefined reference to `backends'
window.o(.text+0x97b):window.c: undefined reference to `backends'
window.o(.text+0x9e1):window.c: undefined reference to `WSACleanup@0'
window.o(.text+0x130c):window.c: undefined reference to `WSACleanup@0'
window.o(.text+0x13d9):window.c: undefined reference to
`WSAAsyncSelect@16'
window.o(.text+0x13e3):window.c: undefined reference to
`WSAGetLastError@0'
window.o(.text+0x40b1):window.c: undefined reference to
`ImmGetContext@4'
window.o(.text+0x40c5):window.c: undefined reference to
`ImmGetCompositionStringW@16'
window.o(.text+0x40e6):window.c: undefined reference to
`ImmGetCompositionStringW@16'
window.o(.text+0x4117):window.c: undefined reference to
`ImmReleaseContext@8'
window.o(.text+0x4270):window.c: undefined reference to
`ImmGetContext@4'
window.o(.text+0x429e):window.c: undefined reference to
`ImmSetCompositionWindow@8'
window.o(.text+0x42aa):window.c: undefined reference to
`ImmReleaseContext@8'
window.o(.text+0x6c81):window.c: undefined reference to `PlaySoundA@12'
windlg.o(.text+0x30bd):windlg.c: undefined reference to `backends'
windlg.o(.text+0x4b99):windlg.c: undefined reference to `backends'
winctrls.o(.text+0x1515):winctrls.c: undefined reference to
`MakeDragList@4'
winctrls.o(.text+0x16ba):winctrls.c: undefined reference to
`LBItemFromPt@16'
winctrls.o(.text+0x16d9):winctrls.c: undefined reference to
`LBItemFromPt@16'
winctrls.o(.text+0x1717):winctrls.c: undefined reference to
`LBItemFromPt@16'
winctrls.o(.text+0x1726):winctrls.c: undefined reference to
`LBItemFromPt@16'
winctrls.o(.text+0x1804):winctrls.c: undefined reference to
`LBItemFromPt@16'
winctrls.o(.text+0x1842):winctrls.c: undefined reference to
`DrawInsert@12'
winctrls.o(.text+0x18ac):winctrls.c: undefined reference to
`DrawInsert@12'
winctrls.o(.text+0x1923):winctrls.c: undefined reference to
`DrawInsert@12'
sizetip.o(.text+0x1ab):sizetip.c: undefined reference to `_tcslen'
sizetip.o(.text+0x37a):sizetip.c: undefined reference to `_tcslen'
winnet.o(.text+0xc29):winnet.c: undefined reference to `inet_addr@4'
winnet.o(.text+0xc49):winnet.c: undefined reference to `gethostbyname@4'
winnet.o(.text+0xc64):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0xce3):winnet.c: undefined reference to `ntohl@4'
winnet.o(.text+0xd45):winnet.c: undefined reference to `htonl@4'
winnet.o(.text+0xd4f):winnet.c: undefined reference to `inet_ntoa@4'
winnet.o(.text+0xe29):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0xeb1):winnet.c: undefined reference to `socket@12'
winnet.o(.text+0xec3):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0xefe):winnet.c: undefined reference to `setsockopt@20'
winnet.o(.text+0xf20):winnet.c: undefined reference to `htonl@4'
winnet.o(.text+0xf2c):winnet.c: undefined reference to `htons@4'
winnet.o(.text+0xf3f):winnet.c: undefined reference to `bind@12'
winnet.o(.text+0xf4c):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0xf89):winnet.c: undefined reference to `htonl@4'
winnet.o(.text+0xf96):winnet.c: undefined reference to `htons@4'
winnet.o(.text+0xfc3):winnet.c: undefined reference to `connect@12'
winnet.o(.text+0xfd0):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1074):winnet.c: undefined reference to `socket@12'
winnet.o(.text+0x1086):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x10b5):winnet.c: undefined reference to `setsockopt@20'
winnet.o(.text+0x10da):winnet.c: undefined reference to `htonl@4'
winnet.o(.text+0x10ed):winnet.c: undefined reference to `htons@4'
winnet.o(.text+0x1100):winnet.c: undefined reference to `bind@12'
winnet.o(.text+0x110d):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1125):winnet.c: undefined reference to `listen@8'
winnet.o(.text+0x1159):winnet.c: undefined reference to `closesocket@4'
winnet.o(.text+0x11a6):winnet.c: undefined reference to `closesocket@4'
winnet.o(.text+0x1278):winnet.c: undefined reference to `send@16'
winnet.o(.text+0x1291):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1590):winnet.c: undefined reference to `ioctlsocket@12'
winnet.o(.text+0x15b9):winnet.c: undefined reference to `recv@16'
winnet.o(.text+0x15d0):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1637):winnet.c: undefined reference to `recv@16'
winnet.o(.text+0x1658):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1713):winnet.c: undefined reference to `recv@16'
winnet.o(.text+0x171e):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x17dc):winnet.c: undefined reference to `accept@12'
winnet.o(.text+0x17eb):winnet.c: undefined reference to
`WSAGetLastError@0'
winnet.o(.text+0x1817):winnet.c: undefined reference to `closesocket@4'
winnet.o(.text+0x1898):winnet.c: undefined reference to `recv@16'
settings.o(.text+0x7b1):settings.c: undefined reference to `backends'
settings.o(.text+0x7b6):settings.c: undefined reference to `backends'
settings.o(.text+0x16ec):settings.c: undefined reference to `backends'
settings.o(.text+0x1732):settings.c: undefined reference to `backends'
settings.o(.text+0x1775):settings.c: undefined reference to `backends'
collect2: ld returned 1 exit status
make: *** [putty.exe] Error 1
any suggestions ?
-Rex
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/