shershen
shershen

Reputation: 9993

Could not build module Cocoa in xcode 8

I am trying to write a simple QuickLook plugin based on apple dev docs and this blog post.

But as son as I add

#import <Cocoa/Cocoa.h>

in the beginning of the *.c file I get an error: Could not build module Cocoa

Which looks like this: enter image description here

I've also tried to add thos libe as a deps in the project, like this: enter image description here with no luck.

I've already tried to reinstall xcode. Also I've read those: iOS : Could not build module <framework-name>, Xcode 5 Couldn't build module Cocoa after installing Xcode 6 beta 2.

I have xcode 8.2 and OS 10.11.

Upvotes: 0

Views: 962

Answers (1)

DDP
DDP

Reputation: 2563

Cocoa frameworks should be #import'd rather than #include'd. However, #import requires an Objective-C file (.m).

Upvotes: 1

Related Questions