Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"could not build module 'Foundation'"

I searched for this question and could not find much help.

Error:

could not build module 'Foundation'

#import <Foundation/Foundation.h>

What is the problem?

like image 422
Robert Cannistraci Avatar asked Sep 23 '14 16:09

Robert Cannistraci


2 Answers

I was able to solve this using the solution provided in this Apple Support Communities thread:

The real problem here is at Build Settings in the session: Apple LLVM 5.0 - Language - Modules, we should set Enable Modules (C and Objective C) to NO

like image 138
Vatsal Manot Avatar answered Nov 04 '22 07:11

Vatsal Manot


The suggested fix to set Enable Modules (C and Objective-C) did not solve this issue for me.

What did is renaming my someFile.c files to someFile.m. Even though those files contain just C functions (that do use Foundation types), naming them .c produces this error.

like image 8
Bryan Avatar answered Nov 04 '22 06:11

Bryan