Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obj-C Modules don't work in workspace

I have some classes that use the new @import module directive and it works fine in my non-workspace project but once I move those files over to a project in a workspace I get the error Unexpected '@' in program similar to this question: @import "Unexpected '@' in program" However I DO have Enable Modules build settings ticked to Yes. The static library in my workspace project also has this option enabled. I tired cleaning the build as well with no luck. Are there any other settings I'm missing?

like image 940
Steve Moser Avatar asked Oct 16 '13 14:10

Steve Moser


2 Answers

Make sure you have ticked the enable modules in both your project and target of your static library and main project.

like image 90
Joel Fischer Avatar answered Nov 09 '22 19:11

Joel Fischer


Are you using Objective-C++? @import does not work in .mm files.

like image 3
IngmarStein Avatar answered Nov 09 '22 19:11

IngmarStein