/usr/include/bits/fcntl2.h:51: 错误: 调用‘__open_missing_mode’,声明有错误属性:open with O_CREAT in second argument needs 3 arguments网上查了一下,说是gcc-4.3对语法检查严格的结果,找到出错的那一句,在我编译的程序里是这句
int fd = open(fn.c_str(), O_WRONLY | O_CREAT | O_TRUNC);
将之改为
int fd = open(fn.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0777);
就OK了参考资料:
http://l...