Trying to use tcl threads on windows 7 results in access violation.
- by Juan
I'm trying to get this simple program to work on windows, but it crashes:
unsigned (__stdcall testfoo)(ClientData x)
{
return 0;
}
int main()
{
Tcl_ThreadId testid = 0;
Tcl_CreateThread(&testid, testfoo, (ClientData) NULL, TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS);
}
I am using a makefile generated by cmake and linking against a version of Tcl 8.5.7 I compiled myself using Visual C++ 2008 express. It was compiled using msvcrt,static,threads and the name of the resulting library is tcl85tsx.lib. The error is:
Unhandled exception at 0x77448c39 in main.exe: 0xC0000005: Access violation writing location 0x00000014.
The Tcl library works fine, and I can even run a threading script example by loading the Thread extension into it. My assumption is that there is something horribly wrong with a memory violation, but I have no idea what. Any help appreciated.