Reputation: 6276
$ cat t1.c
#include <CoreFoundation/CoreFoundation.h>
$ gcc t1.c
In file included from /usr/include/dispatch/dispatch.h:51,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
from t1.c:1:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin14/9.2.0/include-fixed/dispatch/object.h:373:3: error: unknown type name 'dispatch_block_t'; did you mean 'dispatch_object_t'?
373 | dispatch_block_t notification_block);
| ^~~~~~~~~~~~~~~~
| dispatch_object_t
Any help?
Upvotes: 0
Views: 896
Reputation: 11
try using clang, not gnu gcc. when I was using /usr/local/bin/gcc as a compiler, met the same issue. Turning to /usr/local/clang, fix my problem.
Upvotes: 1