Could not build Objective-C module 'libxml2'
gbmksquare opened this issue · 4 comments
I encountered following error trying to build Erik on an empty iOS project using CocoaPods.
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "libxml2-kanna.h"
^
/Users/gbm/Developer/Study/TestApp/Pods/Kanna/Modules/libxml2-kanna.h:1:9: note: in file included from /Users/gbm/Developer/Study/TestApp/Pods/Kanna/Modules/libxml2-kanna.h:1:
#import <libxml2/libxml/HTMLtree.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk/usr/include/libxml2/libxml/HTMLtree.h:15:10: error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
^
<unknown>:0: error: could not build Objective-C module 'libxml2'
After some searching, I fixed the problem by adding $(SDKROOT)/usr/include/libxml2
to
Pod project -> Erik target -> Build Settings -> Header Search Path
Podfile.lock
PODS:
- Erik (2.0.0):
- Erik/Core (= 2.0.0)
- Kanna
- Erik/Core (2.0.0):
- Kanna
- Kanna (2.1.1)
macOS Version 10.12.3
Xcode Version 8.2.1
Hi, thanks to investigate the issue
I never tested this project with Objc
Could you make a PR?
I actually encountered this problem when using Swift 3 with no Objective-C at all.
I attempted the fix above after I saw this:
But I'm not sure if it's the right way of fixing it.
Ok I see objc error, so I have misunderstood
I will test
thx for the kanna issue link
xconfig copied from kanna podspec into erik one to add libxml2 dependency