Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* [Socket Libraries] Link Options to Use w/ GCC v2.7.2?
@ 1998-06-12  4:00 eferg
  1998-06-15  4:00 ` Thomas Riechen
  0 siblings, 1 reply; 2+ messages in thread
From: eferg @ 1998-06-12  4:00 UTC (permalink / raw)



I running Digital UNIX v4.0b on a DEC AlphaServer 2100.  I need to compile a C
program using the TCP/IP socket system libraries.

I have both the native DEC C compiler and GCC v2.7.2 installed.  I prefer to
use GCC.  If I were running Solaris, the command would be:

gcc -O2 -o jserv jserv.c -lsocket -nsl

[QUESTION] What would the command be on Digital UNIX v4.0b / GCC v2.7.2? 
When I try to run the Solaris-based example, I get the following error:

# gcc -O2 -o jserv jserv.c -lsocket -lnsl
collect2: ld returned 1 exit status
/usr/bin/ld:
Can't locate file for: -lsocket

Any help would be appreciated.  Thx - Eric
===============
FROM THE PROGRAM'S EXAMPLE MAKEFILE ...
===============
# Set this to your C compiler
CC=gcc
# These are flags to pass to the compiler/linker.
CFLAGS=-O2
# Library flags -- sockets (and sometimes associated libraries
# are needed.
#Solaris:
LIBRARY_FLAGS= -lsocket -lnsl

default:
        $(CC) $(CFLAGS) -o jserv jserv.c $(LIBRARY_FLAGS)

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-06-15  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-12  4:00 [Socket Libraries] Link Options to Use w/ GCC v2.7.2? eferg
1998-06-15  4:00 ` Thomas Riechen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox