[fpc-pascal]Problems linking to TclTk
david.eidelman at mcgill.ca
Tue Sep 3 18:49:09 CEST 2002
I am attempting to construct an application with an embedded scripting language on Win32. Tcl seemed like a good candidate because you get the graphics for free. I have successfully linked to the tcl84.dll and tk84.dll that come in the Win32 Tcl install. Although the code executes reasonably well some times, I get a variety of internal error messages (usually Runtime error 217) but sometimes by trapping the exceptions I have errors referrering to access violations. The crashes are almost certainly due to memory problems since I get different results when I pass a string to Tcl from the main program rather than from a procedure, or if the length of the string being passed in changes. The errors may have something to do with finalization since I have managed to block them by inserting a HALT before the end of the main program. This only works sometimes though. I have wondered if this could be a threading issue, since Tcl and Tk create extra threads at their initialization (according to gdb).
Does anyone have experience with this type of thing. There is a package for the GNAT Ada compiler that works fine but I would rather use Pascal if possible. (My test code essentially mirrors that of the Ada package, which itself just links to the entry points in the DLLs).
Any help would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal