函数的隐式声明-C99 [英] Implicit declaration of function - C99

查看:142
本文介绍了函数的隐式声明-C99的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用Xcode 4,在我的.pch文件中,我具有以下宏: #define localize(s) NSLocalizedString((s), nil).
当我尝试在某些.m文件中使用此宏时,收到以下警告:Implicit declaration of function 'localize' is invalid in C99.

I am currently using Xcode 4, and in my .pch file I have this macro: #define localize(s) NSLocalizedString((s), nil).
When I try to use this macro in some .m file, I receive this warning: Implicit declaration of function 'localize' is invalid in C99.

此代码可以毫无问题地编译,但是如何解决此问题,从而不会收到警告?

This code compiles without a problem, but how can I fix this so I don't get a warning?

推荐答案

当我用DLog全局替换NSLog时遇到了这个问题.我愚蠢地加入了

I had this problem when I did a global replace of NSLog with DLog. I foolishly included the

#define DLog(...) NSLog(...

陈述,所以我最后得到

#define DLog(...) DLog(...

引起警告和链接器错误.

which caused the warnings, and a linker error.

这篇关于函数的隐式声明-C99的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆