#ifdef Q_CC_MSVC # ifndef KDEWIN_MATH_H static long double sqrt( int a ) { return sqrt( (long double)a ); } # endif #endif i sometimes got sqrt cause stack overflow(vs2008+sp1), and comment out the definiton in the two files, and all is ok.