You are here

Simile 7.4 - R package doesn't work on Windows (Tcl 8.6 vs. 9.0?)

When I try to run Simile 7.4 within R via the Simile package, I get the error

library(Simile)

use.simile.at("c:/Program Files/Simile7.4/")

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : [tcl] this extension is compiled for Tcl 9.0.

Seems that there is a mismatch in the tcl versions.

Simile 7.4 for Windows has bundled TCL 9.0:
"The Windows binary release now bundles TclTk 9.0, for improved performance and printing functionality. " (https://www.simulistics.com/simile_7_4_released)

Whereas R still uses 8.6

tcltk::tclVersion()
[1] "8.6.17

Is there any suggestion how to solve this problem? 

- Is there any option to run Simile 7.4 with tcl 8.6?

- Is there any option to use within R tcltk 9 (except building an own R binary on windows)?

 

Simile Version: 7.4 (Windows)

R version 4.5.3 (2026-03-11 ucrt) -- "Reassured Reassurer"

Simile R-package version: 1.3.4

Thanks,

Gunther

Forums: 

Well now we have uploaded the source code for Simile to Github, you can always compile your own version of Simile that uses TclTk 8.6

Since the R interface interacts with Simile in headless mode, you will only need the two package files in System/lib/Stubs, and you can pass them to Make by name, e.g., "make System/lib/Stubs/ame_dll74.dll System/lib/Stubs/unpacker74.dll". That will save you having to install gprolog.

If this is too much trouble, e.g., you do not have msys2 installed, email info@simulistics.com and we will send you the required files. However you get them, just replace the versions in the installation with them and it should work via the R interface. However you will need the original versions for it to work in the normal way.

The proceeding suggested here https://www.simulistics.com/misc-downloads.htm works.

In order to have both in parallel - a running desktop application and a version that can be run by R - I made a copy of Simile's program folder and replaced the contents of System64/lib/Stubs with the files from https://www.simulistics.com/files/documents/Rcompat.tgz

I can work as usual with the Desktop application and create model dlls. When using R, I just point to the copy of Simile. (Simile::use.simile.at("Simile_copy"))