extern int getopt ( ) ; Evidently your CC is not defining __cplusplus, which would have avoided the error. So what macro does it predefine? But anyway, I suspect that we can just remove the decl entirely. I'm doing that now. We'll see if that causes new brokenness.