标准输出,错误输出,重定向到日志文件:
代码语言:javascript复制logOutFp = freopen(logfile, "a", stdout);
logErrFp = freopen(logfile, "a", stderr);
。。。
fclose(stdout);
fclose(stderr);
单独exe运行正常,,,
编译成dll后,被别的应用程序调用,报错,
Debug Assertion Failed! isatty.cpp Line: 17
Expression: (fh >=0 && ...
类似问题:
fclose causing Debug Assertion Failed crash. https://visual731.rssing.com/chan-13115559/all_p481.html
去掉fclose即可。