I'm creating a command line tool using the Swift package manager and having trouble with CoreImage. When I build, I get the following error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_CIImage", referenced from: objc-class-ref in Image.swift.o ld: symbol(s) not found for architecture x86_64
However, it looks like it can find CoreImage, it's there in the module cache with other system libraries I am using.
% find . -name "CoreImage*" ./.build/x86_64-apple-macosx/debug/ModuleCache/3NO5U2CJWPUVQ/CoreImage-2H41H5QLPV8GG.pcm ./.build/x86_64-apple-macosx/debug/ModuleCache/CoreImage-3RHL4X59LZBS7.swiftmodule ./.build/x86_64-apple-macosx/debug/index/store/v5/units/CoreImage-2H41H5QLPV8GG.pcm-E5JLRUFRAX30
Any ideas how to proceed? I like the ability to set up the tool code as a "framework" which gets automatically embedded in the command line tool and allows much easier unit testing.
A regular Xcode project does build if I add CoreImage to the target's frameworks, but it also creates my internal framework and ArgumentParser as separate frameworks which is awkward.