1、 implicit declaration of function `sleep'
#inlude<unistd.h>
2,、 implicit declaration of function ‘malloc’
#include<stdlib.h>
3,、 implicit declaration of function `memcpy'
#include <string.h>
4、 implicit declaration of function ` inet_addr’
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h> // 經(jīng)常是少加了一個文件,,然后導致了大量的告警,。
5、 suggest parentheses around assignment used as truth value
=改成==
6,、 Multiple definition of
將變量聲明放到.c
GCC的設(shè)定,,可以改變GCC編譯的代碼。
C Language Dialect
GCC_C_LANGUAGE_STANDARD = C89
(C99 permitted if absolutely necessary, especially on iOS)
Choose a standard or non-standard C language dialect.
- ANSI C:
Accept ISO C90 and ISO C++, turning off GNU extensions that are incompatible. [-ansi]?
Incompatible GNU extensions include the ‘a(chǎn)sm’, ‘inline’, and ‘typeof’ keywords? (but not the equivalent __asm__, __inline__, and __typeof__ forms), and the ‘//’ syntax for comments.?
This setting also enables trigraphs. - C89:
Accept ISO C90, but not GNU extensions. [-std=c89] - GNU89:
Accept ISO C90 and GNU extensions. [-std=gnu89] - C99:
Accept ISO C99, but not GNU extensions. [-std=c99] - GNU99:
Accept ISO C99 and GNU extensions. [-std=gnu99] - Compiler Default:
Tells the compiler to use its default C language dialect. This is normally the best choice unless you have specific needs. (Currently equivalent to GNU89.)
Please see the full GCC manual for the full definition of all these settings on the C dialect:?
ios4.1SDK之后,,NSString和char的轉(zhuǎn)換,,不推薦使用cString函數(shù)了
NSString *str =?。郏危樱樱簦颍椋睿纭,。幔欤欤铮悖荩椋睿椋簦祝椋簦瑁疲铮颍恚幔簦海馈埃簦瑁椋螅椋螅ィ洹保椋?;
const char * p_ch = [str UTF8String];
const char * p_ch = [ str cString] ; //對于ios4平臺會提示告警,。并不再建議使用了。
|