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?
Make sure you have ticked the enable modules in both your project and target of your static library and main project.
Are you using Objective-C++? @import does not work in .mm files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With