8

I am receiving this error when using the DCPathButton library (through podspec).

Modules are enabled in my project settings. Do i need to do anything else to enable modules in pods?

Erik Sapir
  • 23,209
  • 28
  • 81
  • 141

2 Answers2

4

If "Link Frameworks Automatically" is already set to YES in the Build Settings, you have to set "Enable Modules (C and Objective-C)" as well.

Marcus Franzen
  • 868
  • 10
  • 25
  • 2
    I have both Link Frameworks Automatically and Enable Modules (C and Objective-C) set to yes, but don't work for me, the error remains – Andrea Gorrieri Jan 23 '20 at 09:21
  • The cause is that I'm using Objective-C++. Then modules in this case get disabled despite the proper build settings. https://stackoverflow.com/questions/29701647/use-of-import-when-modules-are-disabled – Andrea Gorrieri Jan 23 '20 at 10:00
  • I had to [also enable the `-fcxx-modules` compiler flag as well](https://stackoverflow.com/a/65481558/111307) – bobobobo Dec 28 '20 at 17:30
2

Set the "Link Frameworks Automatically" to YES

user3682947
  • 144
  • 1
  • 4