Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 46:43:25 |
Calls: | 583 |
Files: | 1,138 |
Messages: | 111,067 |
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
Am 30.08.2025 um 17:31 schrieb meshparts:
gcc meshparts.c -shared -o C:/Users/public/ meshparts.dll -
DUSE_TCL_STUBS -IC:/Tcl/include -LC:/Tcl/lib -ltclstub -O3
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]
Am 30.08.25 um 17:35 schrieb meshparts:
Am 30.08.2025 um 17:31 schrieb meshparts:
gcc meshparts.c -shared -o C:/Users/public/ meshparts.dll -
DUSE_TCL_STUBS -IC:/Tcl/include -LC:/Tcl/lib -ltclstub -O3
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]
Others may chime in on the warnings. I guess you need to update the
code. Probably instead of int vlen, Tcl_Size vlen or similar.
However, a warning does not prevent the DLL from being created. Are you
sure there is no error at the end?
One thing that seems strange to me is the space between the path and the filename in "-o C:/Users/public/ meshparts.dll"
Is it copy-pasted? -o expects the output file name, which is now a
directory (this does not work) and meshparts.dll is treated as an input
file to link against.
-a-a-a-a-a-a-a-a-a-a-a-a Christian