linux没有GetLastErr但可以用strerror(errno) 不知道是否线程安全呢> 一般我就是 #include <errno.h> ... printf("%S\n", strerror(errno));