[Tkinter-discuss] Detecting tk/tcl include library path

E emilianogavilan at gmail.com
Tue Oct 15 13:52:32 EDT 2019

El 15/10/2019 a las 01:02 p. m., Vasilis Vlachoudis escribió:
> Hi all,
> how can I detect in a makefile the path of the include C header files of 
> tk/tcl?

Two ways.

> There is no tk-config program to return it like other package.
In the default configuration, both Tcl and Tk provides .pc files to use 
with pkg-config, who became the de-facto standard for registering 
package configuration and compilation options. Try

$ pkg-config --cflags tk

The other option is to use the information recorded in the Tcl binary.

$ echo 'puts [tcl::pkgconfig get includedir,install] | tclsh'

since both Tcl and Tk are usually installed in the same --prefix


> I see that every system puts the C header files in a different location like
> /usr/include/tk
> /usr/include/tk8.6
> /sw/include/tcl8.6
> /opt/local/include
> Thanks in advance
> Vasilis
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> https://mail.python.org/mailman/listinfo/tkinter-discuss

More information about the Tkinter-discuss mailing list