From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,37bfa0b65d1d2306,start X-Google-Attributes: gidfee84,public From: eferg@my-dejanews.com Subject: [Socket Libraries] Link Options to Use w/ GCC v2.7.2? Date: 1998/06/12 Message-ID: <6ls0uc$bss$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 362090873 Reply-To: eferg@rco.maxwell.af.mil X-Http-User-Agent: Mozilla/3.04Gold (Win95; I) Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Jun 12 19:52:44 1998 GMT Newsgroups: comp.unix.osf.osf1 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