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?
Asked
Active
Viewed 412 times
6

Community
- 1
- 1

Steve Moser
- 7,647
- 5
- 55
- 94
2 Answers
3
Make sure you have ticked the enable modules in both your project and target of your static library and main project.

Joel Fischer
- 6,521
- 5
- 35
- 46
-
I was missing it on my project however I enabled it, cleaned and I still have the same issue. – Steve Moser Oct 16 '13 at 15:03
-
And you're sure it's enabled on all of your targets? Also, have you tried quitting XCode and re-opening it? Sometimes that will fix odd bugs. – Joel Fischer Oct 16 '13 at 15:06
-
Still no dice. I might try to put example project on github showing the issue. – Steve Moser Oct 16 '13 at 15:53
-
Have you made an example project that I could take a look at? – Joel Fischer Oct 17 '13 at 01:07