<div style="text-align:left">Hi all,<br><br>When trying to build tkinter from source, i get the following errors :<br><br>src/_tkinter.c(33) : warning C4273: &#39;PyOS_InputHook&#39; : inconsistent dll linkage<br>        src/_tkinter.c(32) : see previous definition of &#39;PyOS_InputHook&#39;<br>
src/_tkinter.c(673) : warning C4996: &#39;strcpy&#39;: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>src/_tkinter.c(709) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>
src/_tkinter.c(712) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>src/_tkinter.c(713) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>
src/_tkinter.c(714) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>src/_tkinter.c(2113) : warning C4133: &#39;function&#39; : incompatible types - from &#39;PythonCmd_ClientData *&#39; to &#39;char *&#39;<br>
src/_tkinter.c(2198) : warning C4090: &#39;function&#39; : different &#39;const&#39; qualifiers<br>src/_tkinter.c(2198) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2204) : warning C4133: &#39;function&#39; : incompatible types - from &#39;PythonCmd_ClientData *&#39; to &#39;char *&#39;<br>
src/_tkinter.c(3133) : error C2065: &#39;tcl_lock&#39; : undeclared identifier<br>src/_tkinter.c(3133) : error C2065: &#39;tcl_lock&#39; : undeclared identifier<br>src/_tkinter.c(3133) : warning C4022: &#39;PyThread_acquire_lock&#39; : pointer mismatch for actual parameter 1<br>
src/_tkinter.c(3134) : error C2065: &#39;tcl_tstate&#39; : undeclared identifier<br>src/_tkinter.c(3134) : error C2065: &#39;event_tstate&#39; : undeclared identifier<br>src/_tkinter.c(3138) : error C2065: &#39;tcl_tstate&#39; : undeclared identifier<br>
src/_tkinter.c(3138) : warning C4047: &#39;=&#39; : &#39;int&#39; differs in levels of indirection from &#39;void *&#39;<br>src/_tkinter.c(3139) : error C2065: &#39;tcl_lock&#39; : undeclared identifier<br>src/_tkinter.c(3139) : error C2065: &#39;tcl_lock&#39; : undeclared identifier<br>
src/_tkinter.c(3139) : warning C4022: &#39;PyThread_release_lock&#39; : pointer mismatch for actual parameter 1<br>error: command &#39;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe&#39; failed with exit status 2<br>
<br>since tcl_lock is defined in a #ifdef WITH_THREAD&#39; section and the error happens in a &quot;#if defined(WITH_THREAD) || defined(MS_WINDOWS)&quot; section, i tryed with the WITH_THREAD macro and got new errors :<br>
<br>src/_tkinter.c(33) : warning C4273: &#39;PyOS_InputHook&#39; : inconsistent dll linkage<br>        src/_tkinter.c(32) : see previous definition of &#39;PyOS_InputHook&#39;<br>src/_tkinter.c(673) : warning C4996: &#39;strcpy&#39;: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>
src/_tkinter.c(709) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>src/_tkinter.c(712) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>
src/_tkinter.c(713) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>src/_tkinter.c(714) : warning C4996: &#39;strcat&#39;: This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br>
src/_tkinter.c(1367) : error C2065: &#39;call_mutex&#39; : undeclared identifier<br>src/_tkinter.c(1367) : warning C4047: &#39;function&#39; : &#39;Tcl_Mutex *&#39; differs in levels of indirection from &#39;int *&#39;<br>
src/_tkinter.c(1367) : warning C4024: &#39;Tkapp_ThreadSend&#39; : different types for formal and actual parameter 4<br>src/_tkinter.c(1642) : error C2065: &#39;var_mutex&#39; : undeclared identifier<br>src/_tkinter.c(1642) : warning C4047: &#39;function&#39; : &#39;Tcl_Mutex *&#39; differs in levels of indirection from &#39;int *&#39;<br>
src/_tkinter.c(1642) : warning C4024: &#39;Tkapp_ThreadSend&#39; : different types for formal and actual parameter 4<br>src/_tkinter.c(2113) : warning C4133: &#39;function&#39; : incompatible types - from &#39;PythonCmd_ClientData *&#39; to &#39;char *&#39;<br>
src/_tkinter.c(2138) : warning C4090: &#39;function&#39; : different &#39;const&#39; qualifiers<br>src/_tkinter.c(2138) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2190) : error C2065: &#39;command_mutex&#39; : undeclared identifier<br>
src/_tkinter.c(2190) : warning C4047: &#39;function&#39; : &#39;Tcl_Mutex *&#39; differs in levels of indirection from &#39;int *&#39;<br>src/_tkinter.c(2190) : warning C4024: &#39;Tkapp_ThreadSend&#39; : different types for formal and actual parameter 4<br>
src/_tkinter.c(2198) : warning C4090: &#39;function&#39; : different &#39;const&#39; qualifiers<br>src/_tkinter.c(2198) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2204) : warning C4133: &#39;function&#39; : incompatible types - from &#39;PythonCmd_ClientData *&#39; to &#39;char *&#39;<br>
src/_tkinter.c(2236) : error C2065: &#39;command_mutex&#39; : undeclared identifier<br>src/_tkinter.c(2236) : warning C4047: &#39;function&#39; : &#39;Tcl_Mutex *&#39; differs in levels of indirection from &#39;int *&#39;<br>
src/_tkinter.c(2236) : warning C4024: &#39;Tkapp_ThreadSend&#39; : different types for formal and actual parameter 4<br>error: command &#39;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe&#39; failed with exit status 2<br>
<br>Tested on windows 7 64bits with visual studio 2008 (32 bits) and pypy 1.7<br><br>Thanks,<br>Arnaud<br></div>