[英]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 some data type and constants are declared. 尽管语法正确,但是出现以下错误的原因是什么,我包括了其中声明了一些数据类型和常量的coreservices框架。
" cc:22: error: syntax error before 'CFFileDescriptorRef'
cc:22:错误:'CFFileDescriptorRef'之前的语法错误
cc:22: warning: no semicolon at end of struct or union
cc:22:警告:struct或union末尾没有分号
cc:24: error: syntax error before '}' token
cc:24:错误:“}”标记之前的语法错误
cc:24: warning: data definition has no type or storage class
cc:24:警告:数据定义没有类型或存储类
lipo: can't figure out the architecture type of: /var/folders/fF/fFgga6+-E48RL+iXKLFmAE+++TI/-Tmp-//ccFzQIAj.out "
lipo:无法找出以下架构类型:/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 (eg you forgot to #include
whatever header defines it before using it). ...通常意味着您正在使用未定义的类型(例如,在使用它之前,您忘记了
#include
任何定义它的标头)。
The following code: 如下代码:
foo_t FooBar;
Reproduces the error, unless of course foo_t
is typed somewhere prior to using it. 重现该错误,除非在使用它之前一定要在某个地方键入
foo_t
。
Or, it could be that you fat fingered whatever came before it :) Kind of hard to tell without seeing the code. 或者,可能是您胖乎乎之前出现的所有内容:)有点难以辨认,而没有看到代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.