I'm trying to include a 3rd party static library in my Swift project. I have these two files, among a few others.
GoogleConversionTrackingSDK/ACTReporter.h GoogleConversionTrackingSDK/libGoogleConversionTracking.a
I added the .a
file to the target's "Linked Frameworks and Library" section. I then created a module.map
file in my project, like this:
module GoogleConversionTracking {
header "../../Libs/GoogleConversionTrackingSDK/ACTReporter.h"
export *
}
And in Swift files I can now refer to it:
import GoogleConversionTracking
But I get an error at link time:
ld: library not found for -lGoogleConversionTracking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: library not found for -lGoogleConversionTracking
How do you fix this? I would like to not use a bridging header, but instead use these module definition files, if possible.