没有设断点
我刚刚跟踪了能debug的部分,发现了这一句:
if (NULL == (f = fopen (Filename, "r")))
  {
      snprintf (errortext, ET_SIZE, "Cannot open configuration file %s.", Filename);
      return NULL;
   /*以后略*/
  }
我发现f=NULL所以就退出了。fopen (Filename, "r")是以只读方式打开文件Filename,我的这个Filename是个cfg文件,比如:encoder.cfg。他是不是可以当作文本文档用fopen打开啊?不知道为什么用到这句的时候就跳出。