From: SourceForge.net <no...@so...> - 2012-11-08 12:24:53
|
Feature Requests item #3159088, was opened at 2011-01-15 20:27 Message generated for change (Comment added) made by nijtmans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=3159088&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 40. Dynamic Loading Group: None >Status: Open >Resolution: None Priority: 5 Private: No Submitted By: Anye Li (anyeli) Assigned to: Jan Nijtmans (nijtmans) Summary: lazy bindings for dynamic loading Initial Comment: I would like to have the option of having the dynamic loader perform lazy binding. As of Tcl 8.5.9, the UNIX implementation of dynamic loading always passes RTLD_NOW to dlopen(). I want to build an extension that links to a dynamic library without having to link to an exact (or maximum) version of the library. With RTLD_NOW, if the library I link to is missing some symbols, I cannot load the library at all if it is missing any symbols. With RTLD_LAZY, I could link to the library missing symbols, and avoid referencing them by using run-time version checks. I do not know of a way of doing the same thing with RTLD_NOW without a lot of extra work. ---------------------------------------------------------------------- >Comment By: Jan Nijtmans (nijtmans) Date: 2012-11-08 04:24 Message: See: <http://www.tcl.tk/cgi-bin/tct/tip/416> The use case you are presenting is exactly one described in this TIP ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2012-10-22 05:21 Message: See: TIP #357 <http://tip.tcl.tk/357> The "load" command is not meant to load external libraries, only Tcl extensions. However using the TIP #357 Tcl_LoadFile (for the minimal required functions) followed by Tcl_FindSymbol (for the optional symbols) you should be able to do this. That's the recommended way. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=3159088&group_id=10894 |