interpreter uses an incompatible stubs mechanismhttps://core.tcl-lang.org/tcl/tktview/6f22c7a1fc
Am 16.11.25 um 15:00 schrieb Arjen:
interpreter uses an incompatible stubs mechanismhttps://core.tcl-lang.org/tcl/tktview/6f22c7a1fc
Hello,
I am experimenting with a compiled package for Tcl 9 (9.0.1 to be more precise)
and I get an error message:
interpreter uses an incompatible stubs mechanism
while executing
"load ftcl.dll Ftcl"
(file "runpkg.tcl" line 4)
The call that causes this is Tcl_InitStubs( interp, "9.0", 0)
I have no idea what may be wrong, so any suggestions are appreciated.
(Note: the same code with a different import library of course works fine with
Tcl 8.6)
Regards,
Arjen
Arjen <user153@newsgrouper.org.invalid> posted:
Hello,
I am experimenting with a compiled package for Tcl 9 (9.0.1 to be more precise)
and I get an error message:
interpreter uses an incompatible stubs mechanism
while executing
"load ftcl.dll Ftcl"
(file "runpkg.tcl" line 4)
The call that causes this is Tcl_InitStubs( interp, "9.0", 0)
I have no idea what may be wrong, so any suggestions are appreciated.
(Note: the same code with a different import library of course works fine with
Tcl 8.6)
Regards,
Arjen
I overlooked the interface for the actual Tcl_InitStubs() function (there is an
extra argument there). But a C version is not behaving correctly either. I will
have to investigate this further.
Am 17.11.2025 um 13:04 schrieb Arjen:
Arjen <user153@newsgrouper.org.invalid> posted:
Hello,
I am experimenting with a compiled package for Tcl 9 (9.0.1 to be more precise)
and I get an error message:
interpreter uses an incompatible stubs mechanism
while executing
"load ftcl.dll Ftcl"
(file "runpkg.tcl" line 4)
The call that causes this is Tcl_InitStubs( interp, "9.0", 0)
I have no idea what may be wrong, so any suggestions are appreciated.
(Note: the same code with a different import library of course works fine with
Tcl 8.6)
Regards,
Arjen
I overlooked the interface for the actual Tcl_InitStubs() function (there is an
extra argument there). But a C version is not behaving correctly either. I will
have to investigate this further.
Yes, ping magic Jan, probably living next to you ;-).
There was a lot magic for tcl8.7 which is obsolate now.
And double compile tcl8.6/9.0 may also happen without knowing it...
Great features with pitfalls...
Take care,
Harald
Hello,
I am experimenting with a compiled package for Tcl 9 (9.0.1 to be more precise)
and I get an error message:
interpreter uses an incompatible stubs mechanism
while executing
"load ftcl.dll Ftcl"
(file "runpkg.tcl" line 4)
The call that causes this is Tcl_InitStubs( interp, "9.0", 0)
I have no idea what may be wrong, so any suggestions are appreciated.
(Note: the same code with a different import library of course works fine with
Tcl 8.6)
Regards,
Arjen
Hm, I just built Tcl 9.1a1 from source and tried again. Now it worked (at least
the simple C version). I have to figure out what the magic number is, since on the Fortran side I will have to pass the extra argument directly, but it is a start.
Could that be a byte-ordering problem? I seem to remember that we had
to byte-swap values when intermixing FORTRAN and C (but this was 30
years ago, so bear with me :-)
R'
Ralf Fassel <ralfixx@gmx.de> posted:
Could that be a byte-ordering problem? I seem to remember that we had
to byte-swap values when intermixing FORTRAN and C (but this was 30
years ago, so bear with me :-)
R'
More probable: swap array indices - Fortran uses column-major and C uses row-major to address elements in a multidimensional array. And then of course the start of the indices at 1 or 0.
Right now, my understanding of the C code fails with the bit operations
in place ... ;).
Got it! The problem was of course in a different place than where I was looking.
In the C code the function Tcl_InitStubs() is called via a macro and that manipulates the "exact" argument. My Fortran code was simply assuming the correct
value for "exact" was a logical (or Boolean if you insist) value 0 or 1.
The correct value to pass incorporates the major and minor version of Tcl and
ends up in my case to be 67840. I could have guessed.
Arjen <user153@newsgrouper.org.invalid> posted:
Got it! The problem was of course in a different place than where I was looking.
In the C code the function Tcl_InitStubs() is called via a macro and that manipulates the "exact" argument. My Fortran code was simply assuming the correct
value for "exact" was a logical (or Boolean if you insist) value 0 or 1. The correct value to pass incorporates the major and minor version of Tcl and
ends up in my case to be 67840. I could have guessed.
Now I have to adjust my code to make the command actually work.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 153:53:31 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,760 files (944M bytes) |
| Messages: | 2,457,163 |