Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tcl.h: no such file or directory

Tags:

c++

linux

tcl

I'm trying to port some code over from a Solaris box onto a Linux (specifically Redhat) box. Code compiled without issues and ran without issues on the Solaris box.

However, in recompiling on Linux, I'm running into an issue with tcl.h - the compiler is telling me that error: tcl.h: No such file or directory for multiple files that #include "tcl.h".

As far as I can tell, both tcl8.4 & tk8.4 are installed:

  • /usr/lib/tcl8.4
  • /usr/share/tcl8.4
  • /usr/lib/tk8.4
  • /usr/share/tk8.4

However, I can't find tcl.h anywhere. Does anyone know where it would be? Or is it one of those files that Solaris needed, but Linux does not need to be included? Or even do I need to install something in addition to tcl/tk 8.4?

like image 518
redhotspike Avatar asked Mar 12 '13 14:03

redhotspike


2 Answers

You need to install the development package to get the header files. Depending on your Linux distribution, look for packages named like tcl8.4-dev and tk8.4-dev.

like image 63
Some programmer dude Avatar answered Oct 05 '22 23:10

Some programmer dude


It sounds like you don't have the development files for tcl installed (libraries are usually packaged separately from headers). Try:

$ rpm -qa | grep tcl

If it's not there, find the -devel package to install. If it is, it may be in a directory that the compiler isn't including. If it is installed, you should be able to find the file with rpm (I think the option is -ql <packagename>)

like image 41
teppic Avatar answered Oct 06 '22 01:10

teppic