Closed roblabs closed 3 years ago
Use
#import <libwebp/decode.h>
None of the following worked, all gave the error in Xcode, Preprocessor error file not found
#import <libwebp/decode.h>
#import <libwebp/webp/decode.h>
#import <webp/decode.h> // this the recommendation from the readme
The Package.swift
implies that the 3rd option, readme documentation, makes the most sense:
sources: ["libwebp/src"],
publicHeadersPath: "include",
https://github.com/SDWebImage/libwebp-Xcode/blob/master/Package.swift#L24,L30
Maybe we should use the @import libwebp
. Or custom the Swift Include Path for this..
The Swift Package Manager is used to pull
libwebp
into an Objective-C project. When attempting to use import the headers, the search path doesn't appear to be used.Build Settings
to update either the Header Search Path or User Header Search Paths?include/web/*.h
are symbolic links back tolibwebp/src/webp/*.h
(which we also tried), is there an issue with Swift PM following those links?The error is
The project cannot use the preferred
@import libwebp
. Thank you for supporting Swift PM in this project, as it is very useful.