Request 288 was acted upon.
_________________________________________________________________________
URL: https://rt.openpkg.org/id/288
Ticket: [OpenPKG #288]
Subject: Linux gcc -lsocket problem
Requestors: [EMAIL PROTECTED]
Queue: openpkg
Owner: Nobody
Status: open
Transaction: Correspondence added by [EMAIL PROTECTED]
Time: Thu Nov 20 18:29:31 2003
________________________________________________________________________
On Thu, Nov 20, 2003, Amita Reddy via RT wrote:
>Request 288 was acted upon.
>_________________________________________________________________________
>
> URL: https://rt.openpkg.org/id/288
> Ticket: [OpenPKG #288]
> Subject: Linux gcc -lsocket problem
> Requestors: [EMAIL PROTECTED]
> Queue: openpkg
> Owner: Nobody
> Status: new
> Transaction: Ticket created by [EMAIL PROTECTED]
> Time: Thu Nov 20 09:16:36 2003
>_________________________________________________________________________
>
>
>Hi all,I wrote a simple client server Socket program. Icompiled them successfully but
>when i try to createthe executables, as shownn below, i get the givenerror. These
>programs are already tested on Solaris m/cs andthey work fine there.This is the error
>i am getting. Please let me know ifu have the [EMAIL PROTECTED] csfiles]# [EMAIL
>PROTECTED] csfiles]# lsTCPClient.c TCPServer.o connectsock.c errexit.o
>passivesock.cTCPClient.o connectTCP.c connectsock.o passiveTCP.c
>passivesock.oTCPServer.c connectTCP.o errexit.c [EMAIL PROTECTED] csfiles]#
>[EMAIL PROTECTED] csfiles]# [EMAIL PROTECTED] csfiles]# [EMAIL PROTECTED] csfiles]#
>[EMAIL PROTECTED] csfiles]# gcc TCPClient.o connectTCP.oconnectsock.o errexit.o -o
>client -lsocket -lnsl/usr/bin/ld: cannot find -lsocketcollect2: ld returned 1 exit
>[EMAIL PROTECTED] csfiles]#----------------------------------------------------
>Also when i do not provide the
>-lsocket option it gives me reference errors for the
>variable "errno". So then i commented this variable
>wherever it was being used and then cud generate the
>executable w/o providing -lsocket but still providing
As I understand it, ``extern int errno'' is no longer a valid
definition as errno is replaced by a macro for thread-safe use.
Replacing any ``extern int errno'' with ``#include <errno.h>''
should fix the problems.
Bill
--
INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
``If the future navigation system [for interactive networked services on
the NII] looks like something from Microsoft, it will never work.''
(Chairman of Walt Disney Television & Telecommunications)
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Bug Database Interface www.openpkg.org/bugdb
Bug Database List [EMAIL PROTECTED]