From: Joe E. <jen...@fl...> - 2008-07-01 17:13:17
|
Rene Zaumseil wrote: > > my first try to build kit executables with the new 8.6a1 release failed > because of: > > undefined reference to `Tcl_InitStubs' > undefined reference to `tclStubsPtr' > > Then I found the following in the release notes: > > * C code compiled with USE_TCL_STUBS now must be linked against a > stub library. The Tcl shared library no longer exports variables > used in the stub interface. Analogous changes also made to Tk. > *** POTENTIAL INCOMPATILITY *** > > My link command for 8.5 was: > [... below ...] > Inserting of 'libtclstub8.6.a' for 8.6 does not solve the problem. What error message do you get in this case? Note that for kit executables you must generally link against the stub library *in addition* to the main library, not instead of it. Also the order is important: the tcl stub library must be listed after any extension libraries that use Tcl (including Tk!) if they were compiled with -DUSE_TCL_STUBS. libtk will depend either on libtclstub or libtcl, depending on how it was compiled. libtkstub depends on libtclstub. libtcl depends only on system libraries. If you put libtk, libtkstub, libtcl, and libtclstub towards the end of the link line -- after extension libraries but before system libraries like libm, libdl, libX11, etc. -- in that order, it should link correctly no matter how things were compiled. --Joe English jen...@fl... > gcc -pipe -O2 -fomit-frame-pointer -Wall -Wno-implicit-int pwb.o rechan.o > zlib.o kitInit.o tclAppInit.o\ > /home/rene/kbs/buildLinux/lib/libtk8.6.a /home/rene/kbs/buildLinux/lib/libtcl8 > .6.a\ > /home/rene/kbs/buildLinux/lib/libz.a /home/rene/kbs/buildLinux/lib/vfs1.3/libv > fs1.3.a\ > /home/rene/kbs/buildLinux/lib/vqtcl4.1/libvqtcl4.1.a\ > /home/rene/kbs/buildLinux/lib/thread2.6.5/libthread2.6.5.a -o kbskit8.5-cli\ > -ldl -lpthread -lieee -lm |