X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4C056CD5.1080006@gmail.com> References: <4C056CD5 DOT 1080006 AT gmail DOT com> Date: Wed, 2 Jun 2010 17:21:46 +0200 Message-ID: Subject: Re: linker switches From: Csaba Raduly To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, Jun 1, 2010 at 10:25 PM, James Rome wrote: > I am doing a C project in NetBeans 6.9RC1, in Windows 7 64-bits. > gcc.exe =A0 =A0 -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' As an alternative to Larry Hall's suggestion, If you want to build a Windows program from Cygwin, you need to pass -mno-cygwin to gcc during compilation and probably also during linking. You need to use gcc 3 for this to work. Also, you need to pass the names of the Windows libraries in the linking step; in this case perhaps -lwsock32 --=20 Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torv= alds "People disagree with me. I just ignore them." -- Linus Torvalds -- 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