russhwolf
11/19/2018, 5:06 AMrusshwolf
11/19/2018, 5:06 AM> Task :linkTestDebugExecutableMacos FAILED
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_XCTWaiter", referenced from:
objc-class-ref in combined.o
"_OBJC_CLASS_$_XCTestExpectation", referenced from:
objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
My repo is here: https://github.com/russhwolf/xctest-playground
gradle cinterop setup: https://github.com/russhwolf/xctest-playground/blob/master/build.gradle#L21-L31
def file: https://github.com/russhwolf/xctest-playground/blob/master/src/nativeInterop/cinterop/xctest.def
unit test: https://github.com/russhwolf/xctest-playground/blob/master/src/macosTest/kotlin/sample/SampleTests.kt
I don’t think I really know my way around cinterop yet and was having trouble finding samples using objective-c frameworks, but was trying to follow this issue as a guide: https://github.com/JetBrains/kotlin-native/issues/1764Sam
11/19/2018, 5:18 AMlinkerOpts
line in your xctest.def file. I'm not sure what it should be though.olonho
11/19/2018, 5:21 AMrusshwolf
11/19/2018, 5:34 AMcompilerOpts = -framework XCTest
linkerOpts = -framework XCTest
but that just gets me to
> Task :linkTestDebugExecutableMacos FAILED
ld: framework not found XCTest
Dico
11/19/2018, 8:35 AMolonho
11/19/2018, 10:32 AM-F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/ -framework XCTest
Sam
11/19/2018, 4:32 PM