5

There are two different dependent libraries which have header files with same name "Base64.h". Pod add both libraries dir to the include search paths. Then one of the library would include the wrong "Base64.h".

After I change the

#include "Base64.h"

to

#include "./Base64.h"

in the library with wrong. Then the building is pass.

Is there any method to solve the problem in pod way?

I don't include the Base64.h in my files. The Base64.h only been included by the libraries which installed by pods. My tricky approach is patching the 3rd party library after "pod install". So the approach is ugly.

Qiu Yuzhou
  • 61
  • 4

2 Answers2

3

You should probably use a different import:

#import <Library/Base64.h>
Keith Smiley
  • 61,481
  • 12
  • 97
  • 110
  • You should always be using the `#import ` syntax. – orta Jun 26 '14 at 19:00
  • 1
    I don't include the Base64.h in my files. The Base64.h only been included by the libraries which installed by pods. My tricky approach is patching the 3rd party library after "pod install". – Qiu Yuzhou Jun 27 '14 at 16:50
0

That's really bad on the part of the third party libraries. I don't think there's a better way than patching it yourself. You could try changing the search paths to exclude it yourself, but it might be difficult to do that depending on where it's imported.

Of course, the best solution would be to create a pull request for the library with the updated header or namespace changes. If it's an open source project. But I think you have the best workaround for now.

Dylan Gattey
  • 1,713
  • 13
  • 34