Tcl.h: no such file or directory

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 08:31:48

问题


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?


回答1:


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>)




回答2:


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.



来源:https://stackoverflow.com/questions/15364371/tcl-h-no-such-file-or-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!