Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't import embedded framework with xcode 6 GM

I added a framework target in my project. But when I attempt to import the framework, the compiler will return an error Use of '@import' when modules are disabled. I have already included the arm64 architecture in its Architectures build settings. And I can see the framework in Build Phases. I can import a framework in a new project instead of my current project. Is there any additional config I missed?

like image 990
Leeleo3x Avatar asked Sep 17 '14 05:09

Leeleo3x


2 Answers

Use of '@import' when modules are disabled

Error msg says you are trying to use modules by @import when it is disabled. Goto build settings and enable modules or use #import instead.

enter image description here

Enable it by changing to YES

like image 175
Anil Varghese Avatar answered Sep 27 '22 19:09

Anil Varghese


For those that still have problems with enabling Modules.

The problem could be that the header file was imported into file.mm file (objective-c++), which is not supported to the @import module syntax.

Here is a good answer explaining other possible problems. https://stackoverflow.com/a/21921045/2269679

like image 20
Manuel Escrig Avatar answered Sep 27 '22 21:09

Manuel Escrig