Compilation errors for a c api
What would be the reason for the following errors though the syntax was right and I have included the coreservices framework in which s开发者_StackOverflow社区ome data type and constants are declared.
" c.c:22: error: syntax error before ‘CFFileDescriptorRef’
c.c:22: warning: no semicolon at end of struct or union
c.c:24: error: syntax error before ‘}’ token
c.c:24: warning: data definition has no type or storage class
lipo: can't figure out the architecture type of: /var/folders/fF/fFgga6+-E48RL+iXKLFmAE+++TI/-Tmp-//ccFzQIAj.out "
c.c:22: error: syntax error before ‘CFFileDescriptorRef’
... Usually means that you are using a type that is not defined (e.g you forgot to #include
whatever header defines it before using it).
The following code:
foo_t FooBar;
Reproduces the error, unless of course foo_t
is typed somewhere prior to using it.
Or, it could be that you fat fingered whatever came before it :) Kind of hard to tell without seeing the code.
精彩评论