Difference between revisions of "Tcl library path"

From Verific Design Automation FAQ
Jump to: navigation, search
(Created page with "'''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...")
 
Line 20: Line 20:
 
or:
 
or:
  
2. In the Makefile, replace "-ltcl" with "-L /path/to/your/tcl/library.so".
+
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"

Revision as of 11:46, 27 February 2019

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/libtcl.so (for 32-bit build) or /usr/lib64/libtcl.so (for 64-bit build).

You can either:

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

 [lib64]$ pwd
 /usr/lib64
 [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 libtcl8.5.so
 lrwxrwxrwx 1 root root      11 Nov 29  2016 libtcl.a -> libtcl8.5.a
 lrwxrwxrwx 1 root root      12 Nov 29  2016 libtcl.so -> libtcl8.5.so
 [lib64]$

or:

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"