"No previous prototype for function" warning警告错误解决
2013-10-11 19:39
1471 查看
在编译《iphone开发秘籍》第八章的秘诀一的代码时碰到以下警告错误:
CGPoint randomPoint()
{
int half = 32;
int freesize = 240 - 2 * half;
return CGPointMake(random() % freesize + half, random() % freesize + half);
}
warning:No previous prototype for function "randomPoint"。如何取消这个警告错误呢?方法尝试了这两种都可以:
1.方法上加修饰符static
2.或者Project-Info -> TARGETS ->Build Settings -> LLVM GCC4.2 - Warnings组 -> Missing Function Prototypes Yes->No
CGPoint randomPoint()
{
int half = 32;
int freesize = 240 - 2 * half;
return CGPointMake(random() % freesize + half, random() % freesize + half);
}
warning:No previous prototype for function "randomPoint"。如何取消这个警告错误呢?方法尝试了这两种都可以:
1.方法上加修饰符static
2.或者Project-Info -> TARGETS ->Build Settings -> LLVM GCC4.2 - Warnings组 -> Missing Function Prototypes Yes->No
相关文章推荐
- "No previous prototype for function" warning警告错误解决
- "No previous prototype for function" warning警告错误
- \"No previous prototype for function\" warning警告错误
- XCode 解决"No previous prototype for function"
- "No provider for smtp"错误的处理
- Delphi TMediaPlayer播放音乐出现"no MCI device open"的错误的解决方法;循环播放
- Undefined symbols for architecture i386: "_OBJC_CLASS_$_XX" 错误解决方法
- "No provider for smtp"错误的处理
- vtk使用过程中出现 "no override found for ***"错误的解决办法
- iPhone升级 "This device isn't eligible for the requested build"错误解决方法
- freerradius 错误:pap: WARNING: No "known good" password found for the user
- Struts2中关于"There is no Action mapped for namespace / and action name"的错误解决
- ZIGBEE: Error[Pa045]: function "" has no prototype问题解决方法
- "error: Error retrieving parent for item: No resource found that matches" 错误的解决方法
- "The identity used to sign the executable is no longer valid"错误解决方法
- ”No previous prototype for function “warning警告错误
- eclipse在debug时出现"No symbol "auto" in current context."错误的解决办法
- c语言报错-- no previous prototype for function
- "554 Relay rejected for policy reasons."错误的解决方法
- 解决: 编译警告 : “warning: function declaration isn't a prototype ”