From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu May 26 2005 - 09:49:31 CDT

Lars,
  Yes, it is possible to write plugins that depend on external libraries,
though as you mentioned, this adds complexity to building the plugin tree.
One way around this problem might be to write you plugin such that it uses
dlopen(), dlsym(), and dlclose() to access the library it depends on, rather
than statically linking it. Individuals wanting to use the plugin would
then need to compile NetCDF for their system. This solution makes it easy
to compile the plugin itself, but puts the responsibility of having NetCDF
installed on the shoulders of the end-user which isn't good either.
A third option would be to add the plugin to the build tree as an optional
component that gets built only on-demand, or when a proper NetCDF installation
is detected. That way it wouldn't interfere with compilation of the other
plugins, but would still be available to be built by anyone that wants to.
If the NetCDF library builds cleanly on the majority of platforms, I wouldn't
have any problem with adding your plugin to our builds here. I'd just need
to compile NetCDF on all of the standard VMD target platforms. In any case,
this is certainly a solvable problem. I'd go ahead and write up the plugin
and once you've got it working we can figure out how best to distribute it.

  John Stone
  vmd_at_ks.uiuc.edu

On Thu, May 26, 2005 at 01:21:16PM +0200, Lars Bruno Hansen wrote:
> dear all,
>
> If possible I would like to add a molfile reader/writer plugin for
> our trajectory files. These files are NetCDF formatted files,
> see http://my.unidata.ucar.edu/content/software/netcdf/index.html
> NetCDF is a platform independent file format, with a library that
> implements the format.
>
> The plugin would need to link to this NetCDF library,
> my question is if this is allowed for a VMD plugin to depend on
> a library like NetCDF, NetCDF can built on most platforms, but it
> would increase the difficulty building the plugins.
>
> Thanks for any information on this,
>
> with best regards
> Lars

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078