Subject: what is -ltk looking for?

From: "David Morris" <[email-masked]>
Date: Wed, 28 Aug 1996 17:49:46 -0500

I am trying to compile the Embedded Tk source code and run into an error
when the compiler tries to link to the tk library (gcc ... -ltk ...)

Should I modify that to specify the particular version of the library to
look for. I do have the tcl74 tcl75 (current pointer) tcl75-dev, tk40 tk41
(current pointer) and tk41-dev packages installed.

While I have compiled a few programs using make, I am clueless so far
about it (but want to start figuring it out), so my question is the
broader one as well... if I have -ltk in the command line for gcc, what
specific file will gcc look for?

--
David Morris  [email-masked]
---
The fundamental question in life is whether we live it from the
outside in or from the inside out. - Fritz Perls (founder, Gestalt therapy)
---
   Home Page: http://www.netins.net/showcase/dmorris/
   PGP Public Key available there or via Finger.
---

---

From: "David Morris" <[email-masked]>
Date: Wed, 28 Aug 1996 21:17:03 -0500

Allow me the privelege of flaming myself for not reading   the man pages!!!

I found the answer to all my questions right there in the gcc man file. 

My humblest apologies for spamming the list with my further inanities...

On "Wed, 28 Aug 1996 17:49:46 CDT." "David Morris" wove together:
[> I am trying to compile the Embedded Tk source code and run into an error
[> when the compiler tries to link to the tk library (gcc ... -ltk ...)
[my own ramblings snipped]

---

From: [email-masked] (Heiko Schlittermann)
Date: Thu, 29 Aug 1996 08:20:50 +0200 (MET DST)

David Morris wrote:
: 
: I am trying to compile the Embedded Tk source code and run into an error
: when the compiler tries to link to the tk library (gcc ... -ltk ...)
: 
: Should I modify that to specify the particular version of the library to
: look for. I do have the tcl74 tcl75 (current pointer) tcl75-dev, tk40 tk41
: (current pointer) and tk41-dev packages installed.

Since the libtk versions are incompatible (at API level, as far as I can
guess -- I've tried (now successfully) to adopt source written for
< tk7.4 (?) and for every new libtk (7.4, 7.4) I encountered slight
changes at API level) you should consider change your makefiles to 
the proper library (-ltk74 rsp. -ltk75).

: While I have compiled a few programs using make, I am clueless so far
: about it (but want to start figuring it out), so my question is the
: broader one as well... if I have -ltk in the command line for gcc, what
: specific file will gcc look for?

gcc will look for  (not 100% sure, you should read  the gcc manual or
info pages)
        libtk.so
        libtk.a
in the library path (normally .:/lib:/usr/lib:/usr/local/lib).  The
path can be changed with -L/tmp/lib or similar.

!!! This all is written from mind, please rely too much on this.  Read
!!! the manual pages for the truth.

    Heiko
--
email : [email-masked] [email-masked] [email-masked]
pgp   : A1 7D F6 7B 69 73 48 35  E1 DE 21 A7 A8 9A 77 92 
finger: [email-masked]         [email-masked]

---

From: Shaya Potter <[email-masked]>
Date: Thu, 29 Aug 1996 09:14:59 -0400 (EDT)

It is looking for libtk, the way debian installs tk won't work with just 
-ltk, you need -ltk4.0 or -ltk4.1 depending on which version of tk you 
have installed (or which version the program you are trying to compile 
requires).  

Debian does this so you can have multiple versions of tcl and tk on your 
computer because some programs require a specific version of tcl or tk.

Hope this helps,

Shaya
--
Shaya Potter
[email-masked]

---

From: [email-masked] (David Engel)
Date: Thu, 29 Aug 1996 09:37:45 -0500 (CDT)

> guess -- I've tried (now successfully) to adopt source written for

This is correct and is also why the author started putting the version
number in the library file name.

> the proper library (-ltk74 rsp. -ltk75).

This is what should be done, except your examples should actually
-ltcl7.4 and -ltcl7.5.

David
-- 
David Engel                        Optical Data Systems, Inc.
[email-masked]                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081