next up previous index
Next: Dynamic Linking Up: Using Tcl/Tk Extensions Previous: Using Tcl/Tk Extensions

Joint Loading

With this approach, all external files are loaded and initialised together, exactly like with Tcl/Tk alone. If the underlying architecture does not support dynamic loading, this is the only possible way of using the extensions. There are several steps to be performed:

When we add -v to CFLAGS in the Tree Makefile, we obtain (on Linux)
ld -dll-verbose -m486 -o tree_wish /usr/lib/crt0.o -L/usr/X11R6/lib \
  -L/usr/lib/gcc-lib/i486-linux/2.6.3 tkAppInit.o ./src/libTkTree.a \
  /home/micha/lib/libtk4.0.a /home/micha/lib/libtcl7.4.a \
  -lX11 -lieee -lg++ -lm -lgcc -lc -lgcc

The important files are libTkTree.a, tkAppInit.o and -lg++ (it could also be -lgcc - we can first try it without and if there are some missing symbols, we add it).

The next steps depend on the underlying machine architecture.





next up previous index
Next: Dynamic Linking Up: Using Tcl/Tk Extensions Previous: Using Tcl/Tk Extensions



Micha Meier
Tue Jul 2 09:49:39 MET DST 1996