[NBLUG/talk] Finding tkl.h

Kyle Rankin kyle at nblug.org
Sun Sep 25 20:08:52 PDT 2005


On Sun, Sep 25, 2005 at 08:00:19PM -0700, A'fish'ionado wrote:
> Hello,
> 
> I've been trying to build an app that uses TK for its GUI (the program
> itself is written in C++). When I run make, it chokes when it can't
> find tcl.h. tcl.h is sitting in /usr/include/tcl8.4 (and
> /usr/include/tcl8.3).
> 
> So, how do I tell g++ where tcl.h is? I'm not really that familiar
> with makefiles (he he, at the JC they taught C++ under Windows within
> an IDE...), but there seems to be a variable declared with the value
> "-ltcl -ltk". I can't find the -l option actually documented in the
> gcc man page (geez that's a sucky man page...), but it seems to refer
> to -l as an option for including libraries. OK, but that doesn't tell
> g++ where to include them *from*.
> 
> So, at this point I'm guessing that the solution is probably as simple
> as setting an environment variable, but so far I'm not sure what it
> is. The man page mentions a few environment variables for library
> paths, but so far I haven't made any headway by tweaking them.
> 
> So, any ideas at this point? Oh, yes, this is under Debian Sarge (a
> really really outdated install...), and the application in question is
> EmuLegOS (yes, a really obscure program; you can find it on
> SourceForge).
> 
> Anyway, I've spent enough time going in circles with Bash and VI
> (though I'm slowly learning the makefile format, without even reading
> a single how-to!). :-P
> 
> TIA,
> William
> 

You probably just don't have the Tcl or Tk header packages installed for
your distribution. In my experience the various paths are already set and
you don't have to worry about them. Most distributions have a convention of
adding a -dev or something like that to packages that contain the .h files
you need when compiling against a library, so for instance, if your Tk
package was called tk-8.3.rpm or whatever, the header files would be in
tk-8.3-dev.rpm probably, or at least something along those lines.

Just use your standard package management tool to install the development
version of your Tk and Tcl library packages.

-- 
Kyle Rankin
NBLUG President
The North Bay Linux Users Group
http://nblug.org
IRC: greenfly at irc.freenode.net #nblug 
kyle at nblug.org



More information about the talk mailing list