Tcl library path

From Verific Design Automation FAQ
Jump to: navigation, search

Q: When trying to build, I get the error message: "/usr/bin/ld: cannot find -ltcl". How do I correct that problem?

First, verify that you have tcl and tcl dev installed on your system. Have them installed if they are not.

The "Makefile" provided by Verific has "-ltcl" option. The linker will look for the file /usr/lib/ (for 32-bit build) or /usr/lib64/ (for 64-bit build).

You can either:

1. In /usr/lib (or in /usr/lib64 for 64-bit build), make soft link pointing to and (for static build) libtcl.a to your_lib_tcl_.a. For example:

 [lib64]$ pwd
 [lib64]$ ls -l *tcl*
 -rw-r----- 1 root root 2107226 Nov 29  2016 libtcl8.5.a
 -rwxr-xr-x 1 root root 1194938 Nov 29  2016
 lrwxrwxrwx 1 root root      11 Nov 29  2016 libtcl.a -> libtcl8.5.a
 lrwxrwxrwx 1 root root      12 Nov 29  2016 ->


2. In the Makefile, replace "-ltcl" with "-L /path/to/your/tcl/library -ltclX.y" where X is the major version and y is the minor. Depending on your PATH variable you may also need to adjust the #include <tcl.h> in commands/*.cpp, tclmain/TclMain.cpp (and tclmain/swig.i if it exists) with "#include "/path/to/your/tcl/headers/tcl.h"