delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <3BC5F76D.C6DDFDA3@kalug.linux.org.tw> |
Date: | Fri, 12 Oct 2001 03:47:57 +0800 |
From: | Rex Tsai <chihchun AT kalug DOT linux DOT org DOT tw> |
Reply-To: | Rex Tsai <chihchun AT kalug DOT linux DOT org DOT tw> |
X-Mailer: | Mozilla 4.77 [zh_TW] (X11; U; Linux 2.4.10 i686) |
X-Accept-Language: | zh-TW, en |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Problem when linking with winsock. |
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 AT 8' window.o(.text+0x3fe):window.c: undefined reference to `InitCommonControls AT 0' window.o(.text+0x88e):window.c: undefined reference to `WSACleanup AT 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 AT 0' window.o(.text+0x130c):window.c: undefined reference to `WSACleanup AT 0' window.o(.text+0x13d9):window.c: undefined reference to `WSAAsyncSelect AT 16' window.o(.text+0x13e3):window.c: undefined reference to `WSAGetLastError AT 0' window.o(.text+0x40b1):window.c: undefined reference to `ImmGetContext AT 4' window.o(.text+0x40c5):window.c: undefined reference to `ImmGetCompositionStringW AT 16' window.o(.text+0x40e6):window.c: undefined reference to `ImmGetCompositionStringW AT 16' window.o(.text+0x4117):window.c: undefined reference to `ImmReleaseContext AT 8' window.o(.text+0x4270):window.c: undefined reference to `ImmGetContext AT 4' window.o(.text+0x429e):window.c: undefined reference to `ImmSetCompositionWindow AT 8' window.o(.text+0x42aa):window.c: undefined reference to `ImmReleaseContext AT 8' window.o(.text+0x6c81):window.c: undefined reference to `PlaySoundA AT 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 AT 4' winctrls.o(.text+0x16ba):winctrls.c: undefined reference to `LBItemFromPt AT 16' winctrls.o(.text+0x16d9):winctrls.c: undefined reference to `LBItemFromPt AT 16' winctrls.o(.text+0x1717):winctrls.c: undefined reference to `LBItemFromPt AT 16' winctrls.o(.text+0x1726):winctrls.c: undefined reference to `LBItemFromPt AT 16' winctrls.o(.text+0x1804):winctrls.c: undefined reference to `LBItemFromPt AT 16' winctrls.o(.text+0x1842):winctrls.c: undefined reference to `DrawInsert AT 12' winctrls.o(.text+0x18ac):winctrls.c: undefined reference to `DrawInsert AT 12' winctrls.o(.text+0x1923):winctrls.c: undefined reference to `DrawInsert AT 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 AT 4' winnet.o(.text+0xc49):winnet.c: undefined reference to `gethostbyname AT 4' winnet.o(.text+0xc64):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0xce3):winnet.c: undefined reference to `ntohl AT 4' winnet.o(.text+0xd45):winnet.c: undefined reference to `htonl AT 4' winnet.o(.text+0xd4f):winnet.c: undefined reference to `inet_ntoa AT 4' winnet.o(.text+0xe29):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0xeb1):winnet.c: undefined reference to `socket AT 12' winnet.o(.text+0xec3):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0xefe):winnet.c: undefined reference to `setsockopt AT 20' winnet.o(.text+0xf20):winnet.c: undefined reference to `htonl AT 4' winnet.o(.text+0xf2c):winnet.c: undefined reference to `htons AT 4' winnet.o(.text+0xf3f):winnet.c: undefined reference to `bind AT 12' winnet.o(.text+0xf4c):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0xf89):winnet.c: undefined reference to `htonl AT 4' winnet.o(.text+0xf96):winnet.c: undefined reference to `htons AT 4' winnet.o(.text+0xfc3):winnet.c: undefined reference to `connect AT 12' winnet.o(.text+0xfd0):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1074):winnet.c: undefined reference to `socket AT 12' winnet.o(.text+0x1086):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x10b5):winnet.c: undefined reference to `setsockopt AT 20' winnet.o(.text+0x10da):winnet.c: undefined reference to `htonl AT 4' winnet.o(.text+0x10ed):winnet.c: undefined reference to `htons AT 4' winnet.o(.text+0x1100):winnet.c: undefined reference to `bind AT 12' winnet.o(.text+0x110d):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1125):winnet.c: undefined reference to `listen AT 8' winnet.o(.text+0x1159):winnet.c: undefined reference to `closesocket AT 4' winnet.o(.text+0x11a6):winnet.c: undefined reference to `closesocket AT 4' winnet.o(.text+0x1278):winnet.c: undefined reference to `send AT 16' winnet.o(.text+0x1291):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1590):winnet.c: undefined reference to `ioctlsocket AT 12' winnet.o(.text+0x15b9):winnet.c: undefined reference to `recv AT 16' winnet.o(.text+0x15d0):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1637):winnet.c: undefined reference to `recv AT 16' winnet.o(.text+0x1658):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1713):winnet.c: undefined reference to `recv AT 16' winnet.o(.text+0x171e):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x17dc):winnet.c: undefined reference to `accept AT 12' winnet.o(.text+0x17eb):winnet.c: undefined reference to `WSAGetLastError AT 0' winnet.o(.text+0x1817):winnet.c: undefined reference to `closesocket AT 4' winnet.o(.text+0x1898):winnet.c: undefined reference to `recv AT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |