<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: 'PyOS_InputHook' : inconsistent dll linkage<br> src/_tkinter.c(32) : see previous definition of 'PyOS_InputHook'<br>
src/_tkinter.c(673) : warning C4996: 'strcpy': 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: 'strcat': 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: 'strcat': 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: 'strcat': 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: 'strcat': 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: 'function' : incompatible types - from 'PythonCmd_ClientData *' to 'char *'<br>
src/_tkinter.c(2198) : warning C4090: 'function' : different 'const' qualifiers<br>src/_tkinter.c(2198) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2204) : warning C4133: 'function' : incompatible types - from 'PythonCmd_ClientData *' to 'char *'<br>
src/_tkinter.c(3133) : error C2065: 'tcl_lock' : undeclared identifier<br>src/_tkinter.c(3133) : error C2065: 'tcl_lock' : undeclared identifier<br>src/_tkinter.c(3133) : warning C4022: 'PyThread_acquire_lock' : pointer mismatch for actual parameter 1<br>
src/_tkinter.c(3134) : error C2065: 'tcl_tstate' : undeclared identifier<br>src/_tkinter.c(3134) : error C2065: 'event_tstate' : undeclared identifier<br>src/_tkinter.c(3138) : error C2065: 'tcl_tstate' : undeclared identifier<br>
src/_tkinter.c(3138) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'<br>src/_tkinter.c(3139) : error C2065: 'tcl_lock' : undeclared identifier<br>src/_tkinter.c(3139) : error C2065: 'tcl_lock' : undeclared identifier<br>
src/_tkinter.c(3139) : warning C4022: 'PyThread_release_lock' : pointer mismatch for actual parameter 1<br>error: command 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' failed with exit status 2<br>
<br>since tcl_lock is defined in a #ifdef WITH_THREAD' section and the error happens in a "#if defined(WITH_THREAD) || defined(MS_WINDOWS)" section, i tryed with the WITH_THREAD macro and got new errors :<br>
<br>src/_tkinter.c(33) : warning C4273: 'PyOS_InputHook' : inconsistent dll linkage<br> src/_tkinter.c(32) : see previous definition of 'PyOS_InputHook'<br>src/_tkinter.c(673) : warning C4996: 'strcpy': 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: 'strcat': 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: 'strcat': 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: 'strcat': 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: 'strcat': 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: 'call_mutex' : undeclared identifier<br>src/_tkinter.c(1367) : warning C4047: 'function' : 'Tcl_Mutex *' differs in levels of indirection from 'int *'<br>
src/_tkinter.c(1367) : warning C4024: 'Tkapp_ThreadSend' : different types for formal and actual parameter 4<br>src/_tkinter.c(1642) : error C2065: 'var_mutex' : undeclared identifier<br>src/_tkinter.c(1642) : warning C4047: 'function' : 'Tcl_Mutex *' differs in levels of indirection from 'int *'<br>
src/_tkinter.c(1642) : warning C4024: 'Tkapp_ThreadSend' : different types for formal and actual parameter 4<br>src/_tkinter.c(2113) : warning C4133: 'function' : incompatible types - from 'PythonCmd_ClientData *' to 'char *'<br>
src/_tkinter.c(2138) : warning C4090: 'function' : different 'const' qualifiers<br>src/_tkinter.c(2138) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2190) : error C2065: 'command_mutex' : undeclared identifier<br>
src/_tkinter.c(2190) : warning C4047: 'function' : 'Tcl_Mutex *' differs in levels of indirection from 'int *'<br>src/_tkinter.c(2190) : warning C4024: 'Tkapp_ThreadSend' : different types for formal and actual parameter 4<br>
src/_tkinter.c(2198) : warning C4090: 'function' : different 'const' qualifiers<br>src/_tkinter.c(2198) : warning C4028: formal parameter 4 different from declaration<br>src/_tkinter.c(2204) : warning C4133: 'function' : incompatible types - from 'PythonCmd_ClientData *' to 'char *'<br>
src/_tkinter.c(2236) : error C2065: 'command_mutex' : undeclared identifier<br>src/_tkinter.c(2236) : warning C4047: 'function' : 'Tcl_Mutex *' differs in levels of indirection from 'int *'<br>
src/_tkinter.c(2236) : warning C4024: 'Tkapp_ThreadSend' : different types for formal and actual parameter 4<br>error: command 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' 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>