🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46613

Re: Readline Library with Solarix 2.x

#46613
From: Casper H.S. Dik
Date: Fri, 04 Nov 1994 14:34
48 lines
2838 bytes
dewe0223@kutztown.edu (Daniel A. Dewey) writes:

>  I am trying to get the GNU Readline 2.0 library to compile under 
>Solaris 2.x, with gcc version 2.5.8.  Compiling doesn't present much of a 
>problem (although I do have to include <string.h> instead if <strings.h>, 
>but thats an easy fix).  Linking however boggles my mind.  When I link in 
>the readline library, along with the curses library
>  gcc test.c -lcurses -lreadline
>I get an error message, with functions being undefined.
>Undefined			first referenced
> symbol  			    in file
>BC                                  ./libreadline.a(readline.o)
>tgetnum                             ./libreadline.a(readline.o)
>PC                                  ./libreadline.a(readline.o)
>tgetstr                             ./libreadline.a(readline.o)
>UP                                  ./libreadline.a(readline.o)
>tgoto                               ./libreadline.a(display.o)
>tgetent                             ./libreadline.a(readline.o)
>tgetflag                            ./libreadline.a(readline.o)
>ld: fatal: Symbol referencing errors. No output written to a.out

>As you can see.... the curses stuff isn't being found.  How come?  It is 
>being linked though.  I'm not that familiar with libraries though, so I 
>could have missed something, although I wouldn't know what.

(Unsetenv LD_LIBRARY_PATH before linking)

The solaris FAQ says:

6.11) Why do I get undefined symbols when linking with curses/termcap?

    It is easy to mixup the BSD libcurses and the SVR4 libcurses.
    One lives in /usr/ucblib, the other in /usr/ccs/lib, when
    you've installed SUNWarc.  Note that when you specify:

	    -L/usr/ucblib -lucb -L/usr/ccs/lib -lcurses

    you will pick the *ucb* version of libcurses, not the SVR4
    version.  If you always put libucb last, as recommended in the
    previous question, you will have no such problem.

    --- end of excerpt from the FAQ

Questions marked with a * or + have been changed or added since
the FAQ was last posted

The most recently posted version of the FAQ is available from
ftp.fwi.uva.nl in directory /pub/solaris
Technical Details
Message-ID: <39dgp4$3g2@mail.fwi.uva.nl>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!not-for-mail
References: <78396184234n11@130.37.128.6> <Pine.3.89.9411040811.A24722-0100000@atlantic>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,55c9c21ea83f1f89
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-04 06:34:12 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!not-for-mail
From: casper@fwi.uva.nl (Casper H.S. Dik)
Newsgroups: gnu.gcc.help
Subject: Re: Readline Library with Solarix 2.x
Date: 4 Nov 1994 15:34:12 +0100
Organization: FWI, University of Amsterdam
Lines: 48
Distribution: gnu
Message-ID: <39dgp4$3g2@mail.fwi.uva.nl>
References: <78396184234n11@130.37.128.6> <Pine.3.89.9411040811.A24722-0100000@atlantic>
NNTP-Posting-Host: mail.fwi.uva.nl