Overview
| Artifact ID: | cf2048e94bbb3a0f08be09fcce91bebda5d1762e |
|---|---|
| Ticket: | 1961211fffffffffffffffffffffffffffffffff
TclpDlopen failing on MacOSX 10.4 and later |
| User & Date: | nijtmans on 2008-05-16 15:22:50 |
Changes
- icomment:
Logged In: YES user_id=61031 Originator: NO > but don't call other people's work > "broken" when it's obviously not. I don't consider your work broken, I consider the Mac option -flat_namespace broken when used in combination with Tcl extesions. Tcl expects its extensions to be linked using the command defined in tclConfig.sh (see TCL_SHLIB_LD in that file). Additional flags are not Tcl's reposibility, sorry for that..... So, what you can do is create a shared library containing the XXX_Init function only. All it does is dlopen the remaining of the libraries with the RTLD_GLOBAL flag, and call whatever functions it wants. All other libraries can be legacy libraries, and compiled with or without -flat_namespace whatever you like. Only the library that is loaded by Tcl cannot be compiled with -flat_namespace. This way, you can have your legacy libraries as you like, while the Tcl extension itself, which is only a small wrapper, conforms with the Tcl guidelines. So, yes, Tcl supports legacy libraries just fine, you only have to wrap it up following the Tcl guidelines. If that guidelines conflict with how the legacy libraries are build, then that's a (solvable) problem. Regards, Jan Nijtmans - login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"