www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.5 required=5.0 tests=AWL,BAYES_05,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4C056CD5.1080006@gmail.com> |
Date: | Tue, 01 Jun 2010 16:25:57 -0400 |
From: | James Rome <jamesrome AT gmail DOT com> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | linker switches |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
I am doing a C project in NetBeans 6.9RC1, in Windows 7 64-bits. Using the latest Cygwin tool set, I get linker errors from winsock2. Please tell me what switches I have to use to get link to work. I'd also like to get rid of the fd_set error. I am not including sys/types anywhere. Thanks, Jim .... gcc.exe -c -g -MMD -MP -MF build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o.d -o build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o src/tkfPusher.c In file included from src/tkfPusher.c:26: /usr/include/w32api/winsock2.h:103:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This may cause runtime problems with W32 sockets" mkdir -p dist/Debug-Cygwin/Cygwin_4.x-Windows gcc.exe -o dist/Debug-Cygwin/Cygwin_4.x-Windows/tkfpush build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o: In function `main': /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:173: undefined reference to `_WSAStartup AT 8' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:182: undefined reference to `_socket AT 12' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:185: undefined reference to `_WSAGetLastError AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:186: undefined reference to `_WSACleanup AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:195: undefined reference to `_inet_addr AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:196: undefined reference to `_htons AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:203: undefined reference to `_connect AT 12' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:212: undefined reference to `_WSACleanup AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:220: undefined reference to `_send AT 16' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:221: undefined reference to `_send AT 16' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:223: undefined reference to `_send AT 16' build/Debug-Cygwin/Cygwin_4.x-Windows/src/tkfPusher.o: In function `getFirstFreePort': /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:300: undefined reference to `_WSAStartup AT 8' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:309: undefined reference to `_socket AT 12' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:312: undefined reference to `_WSAGetLastError AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:313: undefined reference to `_WSACleanup AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:318: undefined reference to `_inet_addr AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:323: undefined reference to `_htons AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:325: undefined reference to `_bind AT 12' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:331: undefined reference to `_closesocket AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:332: undefined reference to `_WSACleanup AT 0' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:337: undefined reference to `_closesocket AT 4' /cygdrive/c/Users/jar/GraphiC2/tkfPush/src/tkfPusher.c:338: undefined reference to `_WSACleanup AT 0' make[2]: Leaving directory `/cygdrive/c/Users/jar/GraphiC2/tkfPush' make[1]: Leaving directory `/cygdrive/c/Users/jar/GraphiC2/tkfPush' collect2: ld returned 1 exit status make[2]: *** [dist/Debug-Cygwin/Cygwin_4.x-Windows/tkfpush.exe] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 2s) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |