Frage

I use ActiveStates TCL version 8.6.0.0 for Windows x64. In a script I call:

package require tcom

Tcom is included in the installation but I get the following error:

couldn't load libary "C:/TCL/lib/tcom/tcom.dll": Invalid argument while executing
"load C:/TCL/lib/tcom/tcom.dll"
("package ifneeded tcom 3.9" script)
invoked from within
"package require tcom"

Does anyone understand whats actually missing? C:/TCL/lib/tcom/tcom.dll is installed on my system, so what is the "invalid argument" ?

War es hilfreich?

Lösung

This appears to be a 32-bit/64-bit issue. You can't mix different bit-sizes within the same process and you may well have installed a 64-bit build of ActiveTcl 8.6.0.0 under the belief that matching the size of the build and the system architecture is a good idea. Alas, this is not the case. ActiveTcl 8.6.0.0 for 64-bit Windows, for commercial reasons, requires an extra product key to access their 64-bit builds of external packages. But you've got the package installed anyway (perhaps from a previous installation of ActiveTcl?) and that appears to be a 32-bit build.

The misleading error from using the wrong size of binary library build is unfortunate (a relatively minor bug stemming from the subtle differences between Windows and POSIX and how Tcl handles the mapping between the two) but I'd bet that's it.

The easiest fix is to:

  1. Uninstall all copies of ActiveTcl that you've got installed, then
  2. Ensure that your C:\Tcl directory really is deleted, and then
  3. Install the 32-bit build of ActiveTcl 8.6.0.0 (which works just fine on Win64-based systems like 64-bit Windows 7 and Windows 8). Once you've done that, you
  4. Use teacup update to get a full set of packages installed and you should get Tcom working.

Except on ARM with extra trickiness, which doesn't apply here.
I'm not going to try to justify them; it's their decision, not mine.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top