Hello,
I am trying to add a framework to my KMP library in order to use it in an iOS app. I get the error message:
Undefined symbols for architecture x86_64
I am not really sure about the right way to link this framework.
I tried to add the headers of this framework to
compilerOpts
as well but it did not change anything.
Is there anything I need to change or add in the def file or build.gradle?
For now the linkerOpts looks like that in my def file:
linkerOpts= \
-F/absolute/path/to/MyFramework.framework \
-framework AVFoundation \
-framework Foundation \
-framework CoreGraphics \
-framework CoreVideo \
-framework QuartzCore \
-framework UIKit \
-framework CoreLocation \
-framework Security \
-framework CFNetwork \
-framework CoreMedia \
-framework SystemConfiguration \
-framework AudioToolbox
in my build.gradle
iosX64("ios") {
binaries {
framework('Shared'){
linkerOpts "-F/absolute/path/to/MyFramework.framework"
}
}
compilations.main {
cinterops {
myCinterop {
linkerOpts "-F/absolute/path/to/MyFramework.framework"
}
}
}