[vtkusers] Hybrid Build Returning Errors
David Gobbi
dgobbi at irus.rri.ca
Thu May 2 13:29:43 EDT 2002
On Thu, 2 May 2002, Prabhu Ramachandran wrote:
> >>>>> "DG" == David Gobbi <dgobbi at irus.rri.ca> writes:
>
> DG> On Win32, the PATH that a DLL uses to load other DLLs includes
> DG> the directory where that DLL is located. So having all the
> DG> Python DLLs in the same directory is enough to ensure that
> DG> they can load each other.
>
> Ok, but the Python22\Lib\site-packages\VTK is not on PATH (though it
> is in PYTHONPATH). I'm not sure if PYTHONPATH translates to PATH. Or
> are you saying that the the current directory is always in the path
> and when Python loads the module, the DLLS on the same directory are
> found correctly?
Yes, that is what I meant to convey.
> DG> The dependency of the libvtk*Python.so's need only be back to
> DG> libvtkCommonPython.so, because the vtkPythonUtils class (that
> DG> contains some C++ methods used by all the modules) is stored
> DG> in there. It might be possible to force dynamic linkage of
> DG> these methods at run-time using Python's own low-level dynamic
> DG> loading functions.
>
> Please, if you can do this then it should be very easy to write a
> setup.py that installs the right packages in the right places without
> the need for either linking libraries here and there or editing
> /etc/ld.so.conf. It would be very nice if this were possible.
It certainly is possible, but vtkPythonUtil exports quite a few functions
so dynamic linking of all those functions via pointers is quite a task.
I'll have to think about it a bit to figure out a way to implement it
without creating a huge mess.
The way to do it might be to the all the functions in vtkPythonUtil linked
statically into each of modules, and then defining a new function that
returns a pointer to the one data structure that needs to be shared
between the modules (the vtkPythonHash).
- David
More information about the vtkusers
mailing list