From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Nov 02 2009 - 13:57:35 CST

Hi,
  You need to link your C++ code against the same Tcl DLL files
that are included with the VMD installation, and not the ActiveState
libraries. If you compile against the ActiveState DLLs, then you can
only use your module with their interpreter (and of the same version
as the one you compiled against). It's just like compiling against
any other DLL, you can't just mix and match, you have to run using
exactly the same DLL you compiled against.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Nov 01, 2009 at 02:32:42PM +0800, vmd_chcwaaa wrote:
>
> Dear all,
> I convert a c++ class (with a name CIce) to tcl .dll using SWIG. It
> works well on ActiveTcl using tclsh8.5.exe on a windows XP platform.
> However, when I use the dll in VMD, it returns erroes that command CIce
> doesn't exist. The script is like this:
> catch { load ./icelattice[info sharedlibextension] icelattice}
> ;#icelattice is the name of dll file
> puts "Creating some objects:" ;#It goes well until the next command and
> it seems that the dll file has been successfully loaded but the calss is
> not recognized.
> catch { CIce mywaterice }
> catch { mywaterice command }
>
> I am really very confused. The interpreter console in VMD (Tk console) is
> different from tclsh, is this the reason? If it is, what could I do to
> make the dll file recognized by the tk console? I would be grateful if any
> of you could give me some advice.
>
> cheers,
> Cong Chen
> 2009-11-01
>
> ----------------------------------------------------------------------
>
> vmd_chcwaaa

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