> >>Then I added > >> > >> > >>#ifndef _WIN32 > >>#define __cdecl > >>#endif > >> > >>static void __cdecl laction (int i) { > >>____________+++++++ > > > >Why is this needed? > > Because signal handlers require it: > > http://msdn.microsoft.com/en-us/library/xdkz3x12%28v=vs.71%29.aspx Are you sure? According to this page, it seems that this declaration should not be necessary: http://msdn.microsoft.com/en-us/library/zkwh89ks%28v=vs.80%29.aspx __cdecl [...] This is the default calling convention for C and C++ programs. [...] Because the C naming and calling conventions are the default, the only time you need to use __cdecl is when you have specified the /Gz (stdcall) or /Gr (fastcall) compiler option. -- Roberto