how is tgetent defined?

how is tgetent defined?

Post by David J. Ca » Tue, 02 Oct 1990 03:45:00



I just extracted the curses-clock.shar archive from comp.unix.questions,
and it gave me an error that certain symboks were undefined, as below.
Fine, I said, I will just use -ltermcap or -lcurses, but neither worked.
Can anyone tell me in what library these symbols are defined?  I am
using a Sun 3/260 running SunOS 4.0.3.  Thank you,  -David-

cc -ltermcap -o gdc -O gdc.c -lcurses
ld: Undefined symbol
   _tgetent
   _tgetflag
   _tgetstr
   _tputs
   _tgetnum
   _tgoto
*** Error code 1
make: Fatal error: Command failed for target `gdc'



uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110
--


uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110

 
 
 

how is tgetent defined?

Post by Richard O'Kee » Tue, 02 Oct 1990 10:58:00



Quote:> cc -ltermcap -o gdc -O gdc.c -lcurses

     ^^^^^^^^^
Libraries should come *after* all the modules that use them.  Write
        cc -o gdc -O gdc.c -lcurses -ltermcap

 
 
 

how is tgetent defined?

Post by jim fro » Tue, 02 Oct 1990 19:37:00



|cc -ltermcap -o gdc -O gdc.c -lcurses
|ld: Undefined symbol
|   _tgetent
[etc]

Order of the libraries on the command line is important.  Use:

        cc -o gdc -O gdc.c -lcurses -ltermcap

jim frost
software tool & die

 
 
 

how is tgetent defined?

Post by Doug Gw » Tue, 02 Oct 1990 22:26:00



Quote:>Fine, I said, I will just use -ltermcap or -lcurses, but neither worked.

Try -ltermlib.  By the way, -lwhatever is NOT a command line option;
it's shorthand for a library file name and thus should be placed after
the .o names.
 
 
 

how is tgetent defined?

Post by Paul Gillingwat » Tue, 02 Oct 1990 22:30:00



Quote:>I just extracted the curses-clock.shar archive from comp.unix.questions,
>and it gave me an error that certain symboks were undefined, as below.
>cc -ltermcap -o gdc -O gdc.c -lcurses
>ld: Undefined symbol
>   _tgetent >   _tgetflag >   _tgetstr >   _tputs >   _tgetnum >   _tgoto

We ran into a similar problem recently.  There seems to be a trend for
vendors of UNIX to drop support for /etc/termcap, in favour of termlib.

If this is the case with your Sun, you might try using the terminfo
library anyway, since some of the termcap functions are emulated
using terminfo calls.  This support might be withdrawn in future too.

This wasn't a solution for us, because we extended the termcap we
use to add things like box drawing elements and other video attributes.
Finally, we found some Public Domain emulations of tgetent et.al.,
which I will be happy to share if there are enough requests.  I'd
rather not mail them, since we have to pay quite a bit for all mail coming
into and out of NZ.  The routines are from:
/*
 *      termcap.c       1.1     20/7/87         agc     Joypace Ltd
 *
 *      Copyright Joypace Ltd, London, UK, 1987. All rights reserved.
 *      This file may be freely distributed provided that this notice
 *      remains attached.
 *
 *      A public domain implementation of the termcap(3) routines.
 */
--
Paul Gillingwater, Computer Sciences of New Zealand Limited

Call Magic Tower BBS V21/23/22/22bis 24 hrs NZ+64 4 767 326
SpringBoard BBS for Greenies! V22/22bis/HST NZ+64 4 767 742

 
 
 

how is tgetent defined?

Post by Timothy Jon » Tue, 02 Oct 1990 17:55:00


Include the termcap library *after* curses (i.e. cc ... -lcurses
-ltermcap).

--
========================================================================

Columbia University Center for Computing Activities       (212) 854-8319

 
 
 

1. gcc #define #define #define

Simple. There are several standards designed to alleviate
porting pains. ANSI C, POSIX, X/Open are the major ones.
As long as your program adheres to the above standards it
is easily portable. E.g. for most Xlib and/or Motif programs
it is only required that you need a different makefile
because of various include and lib directories. In fact,
Linux is one of platforms that provide both BSD and SysV
library calls and other features. Try to write or port
something to/from SunOS to IRIX then you will see what all
those #ifdefs are all about. :)

Let me find an example to back up my point: I write a
program and I need to find a way to zero out a memory
area. I found several library functions that can do that,
bzero() and memset(). I look at the bottom of the man
pages:

bzero() CONFORMING TO BSD 4.3

memset() CONFORMING TO SVID 3, BSD 4.3, ISO 9899

Now it is obvious that it is better to use the latter.

Unless, of course, I misunderstood you. What exactly are
you dealing with where you have problems with lots of #ifdefs?
Then maybe me or someone else can provide you some more
specific assistance?

--
<vladimip at uniserve com> | Good pings come in small packets
     Vancouver, BC | SIGSIG: signature too long (core dumped)
Things are more like they are today than they ever were before -
(From a crosspost between alt.suicide and alt.destroy.microsoft)

2. ARE YOU HAVING A PROBLEM DRIVING A WORKSTATION MONITOR ON A PC????

3. m4: how to define var if another defined

4. Linux, WinNT, and dos on same system - how?

5. #define _POSIX_C_SOURCE and other defines

6. Solaris 7: "Warning: /pci@0,0/pci-ide@7,1/ata@1 (ata1):"

7. Getting rid of tgetent error in termcap-2.0.8

8. Perl's DBD::mysql will 'make' but won't 'make test' on Solaris 10

9. tgetent: warning: termcap entry too long

10. using tgetent()

11. PROBLEMS WITH tgetent() AND tgetstr()

12. rn/rrn term.c/tgetent() Followup

13. Kerberos & tgetent