From: eferg@my-dejanews.com
Subject: [Socket Libraries] Link Options to Use w/ GCC v2.7.2?
Date: 1998/06/12 [thread overview]
Message-ID: <6ls0uc$bss$1@nnrp1.dejanews.com> (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
next reply other threads:[~1998-06-12 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-12 4:00 eferg [this message]
1998-06-15 4:00 ` [Socket Libraries] Link Options to Use w/ GCC v2.7.2? Thomas Riechen
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox