刚好在项目中遇到了这样的问题,记录学习用,参考链接:https://blog.csdn.net/baidu_33879812/article/details/96297755
Qt中编写程序使用到了系统调用函数close(),本意是关闭已经打开的文件描述符,但是编译时报错,提示:error: too many arguments to function call, expected 0, have 1, ‘close‘ declared here.意思是参数太多了,追进去发现是因为Qt自动选用了槽函数中的close(),是不带参数的,声明如下:
public Q_SLOTS:
bool close();
解决方法:
原文:https://www.cnblogs.com/xingboy/p/14415274.html