Closed anna-hope closed 10 years ago
It looks like you haven't linked to tcl. What platform are you on, what version of tcl/tk do you have installed and how did you try and build the example?
I'm on OS X. I downloaded Tcl 8.6.1 from ActiveState, and I'm trying to build with 'dub --config=example.'
As far as i'm aware Tcl/Tk is already installed on MacOS but installing the ActiveState version shouldn't hurt. Check that your Tcl/Tk libraries are able to be found on the command line. Try:
echo $PATH;
and make sure the libs are located in one of those paths. You can also try:
locate libtcl.so;
locate libtk.so;
to find where Tcl/Tk is. Mine is located in /usr/lib/
and looks like this:
lrwxrwxrwx 1 root root 26 Jan 23 18:56 libtcl.a -> /usr/local/lib/libtcl8.6.a*
lrwxrwxrwx 1 root root 27 Jan 23 18:56 libtcl.so -> /usr/local/lib/libtcl8.6.s
lrwxrwxrwx 1 root root 25 Jan 23 18:57 libtk.a -> /usr/local/lib/libtk8.6.a*
lrwxrwxrwx 1 root root 26 Jan 23 18:57 libtk.so -> /usr/local/lib/libtk8.6.so*
etc...
These are the libs that need to be linked to your program in order for it to function correctly.
When I try to build the example, it fails with:
"Undefined symbols for architecture x86_64: "_Tcl_MainEx", referenced from: _Tcl_Main in tkd.o"
Any ideas?