From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Mar 14 2005 - 09:47:35 CST

Nicolas,
  One thing you need to double-check here is that the DLL you create
(the compiled file will end up being named gmplugin.so when it's finished)
needs to export several functions as external entry points.
These functions are:
  VMDPLUGIN_init()
  VMDPLUGIN_register()
  VMDPLUGIN_register_tcl()
  VMDPLUGIN_fini()

When we compile the VMD plugin tree using the GNU 'make' utility from Cygwin,
one of the things our scripts do is supply the right options to MSVC to
force those functions to be linked as external DLL entry points.
I don't know anything about the Borland compilers, but the error your
getting seems to indicate that the plugin doesn't contain the main
VMDPLUGIN_init() function as an exported DLL entry point.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Mar 14, 2005 at 11:41:04AM +0100, Nicolas CHARVIN wrote:
> Hello
>
> I have just written a plugin to read files from GMQ, our own MD software.
> This plugin is largely based on xyzplugin.c
>
> Under Linux, I have no problem compiling it: "gcc -shared gmqplugin.c", and
> it works very well. But I cannot compile it for Windows, using Borland free
> commandline tools bcc 5.5.
>
> Looking in makefiles, it looks like VMD windows developpers are using
> microsoft Visual C++.
>
> I try to translate theses makefiles under BCC, using:
> bcc32 -WD -DWIN32 gmqplugin.c
>
> (-WD : Generate a .DLL executable ; -DWIN32 : define WIN32 )
>
> it ouputs a gmqplugin.dll, that I rename to gmqplugin.so, and place under
> the plugins\WIN32\molfile folder.
>
> But, when I start VMD, the console says: "Didn't find the register
> function; no plugins loaded".
>
>
> Does anybody who have already written plugins using Borland tools can help
> me? Maybe Microsoft Tools are mandatory, but I am a little reluctent to
> install all this stuff.
>
> Thanks in advance.
>
> Nicolas
> --
> Nicolas.Charvin_at_univ-savoie.fr
> LMOPS - Lab. Matériaux Organiques à Propriétés Spécifiques
> Bât IUT - Université de Savoie
> 73376 LE BOURGET DU LAC CEDEX
> Tel: 04-79-75-86-53
>
> http://www.univ-savoie.fr/labos/lmops
>

-- 
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