loading shared objects from SWIG

Posted by gfischer on 2008-06-19 10:20
Forums: TDK discussion | OS: Linux

I've built some C functions into shared object files with SWIG that I am able to successfully load into the ActiveTCL wish/tclsh interpreters and use. However, when I try to use the prefix files (base-tk-linux-x86_64) as interpreters, I get the following:

% load ccontrol.sl.lin64
couldn't load file "ccontrol.sl.lin64": ccontrol.sl.lin64: undefined symbol: Tcl_TraceVar

What am I doing wrong? I got this working before, but I don't remember how.

Thanks.

jeffh
ActiveState Staff
Thu, 2008-06-19 16:07

To load into a basekit (aka tclkit or starpack), you must compile C extensions to support the Tcl stubs mechanism and not load the general Tcl library. This provides for the necessary system portability. More on stubs at http://wiki.tcl.tk/285.