delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/04/09:15:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3F057DDC.3789340C@dessent.net>
Date: Fri, 04 Jul 2003 06:15:08 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
X-Accept-Language: en,en-US
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Error compiling code using winsock functions
References: <Law11-F269hRNiBfrS600032521 AT hotmail DOT com>

David None wrote:
> 
> Hi there, thanks for the reply, but I've tried the methods suggested (just
> using windows.h and #define Win32_Winsock), also as Win32_Winsock is
> deprecated, I also tried defining __USE_W32_SOCKETS
> but I'm still receiving the same error:
> 
> I get the following error:
> "iphdrinc.o(.text+0x820):iphdrinc.c: undefined reference to '_WSASocketA AT 24'
> collect2: ld returned 1 exit status"
> 
> hopefully some more ideas are floating around ? =)

$ find /lib/w32api/ -name \*.a | xargs nm -o | grep -i wsasocketa
/lib/w32api/libws2_32.a:ds00061.o:00000000 T WSASocketA AT 24
/lib/w32api/libws2_32.a:ds00061.o:00000000 I _imp__WSASocketA AT 24


Try "-lws2_32" on your gcc line.

Brian

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019