Am 30.08.2025 um 17:31 schrieb meshparts:
Hi there,
I'm trying to compile an extension for Tcl 9, freshly moving from Tcl 8.
Before that, I was using this command to compile:
gcc meshparts.c -shared -o C:/Users/public/ meshparts.dll -
DUSE_TCL_STUBS -IC:/Tcl/include -LC:/Tcl/lib -ltclstub86 -O3
I can't manage to make this work with Tcl 9 by changing the option - ltclstub86 to -ltclstub (since I see there is a tclstub.lib in that directory):
gcc meshparts.c -shared -o C:/Users/public/ meshparts.dll -
DUSE_TCL_STUBS -IC:/Tcl/include -LC:/Tcl/lib -ltclstub -O3
Any help much appreciated.
Thanks
Alexandru
Actually, there are no errors when compiling with the above command.
Just no DLL is created.
I get a lot of warnings like this:
In function 'VectorsSum_Cmd':
meshparts.c:3349:35: warning: passing argument 3 of 'tclStubsPtr->tcl_ListObjLength' from incompatible pointer type [-Wincompatible-pointer-types]
Tcl_ListObjLength(ip, objv[1], &vlen);
Those warnings are new, did not happen with Tcl 8.
Here are the corresponding lines of code:
static int
VectorsSum_Cmd (ClientData cdata, Tcl_Interp *ip, int objc, Tcl_Obj
*const objv[]) {
// objv[1] vector
// objv[2] vector
Tcl_Obj *listElemPtr, **objCoeff;
int i, vlen;
Tcl_ListObjLength(ip, objv[1], &vlen);
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)