Closed
Description
- I have read CONTRIBUTING and have done my best to follow them.
What did you do?
Add Quick to SPM Package.swift as a dependency and try to run tests.
What did you expect to happen?
Test target would compile and run.
What actually happened instead?
Test target failed to compile. Got the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_XCTestCase", referenced from:
_OBJC_CLASS_$__QuickSpecBase in QuickSpecBase.o
"_OBJC_METACLASS_$_XCTestCase", referenced from:
_OBJC_METACLASS_$__QuickSpecBase in QuickSpecBase.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Environment
List the software versions you're using:
- Quick: 3.0.0
- Xcode Version: 11.5
- Swift Version: Xcode Default
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
- Swift Package Manager: 5.2.0
Project that demonstrates the issue
Just ran swift package init
and added Quick as a dependency to the package and test target.
// swift-tools-version:5.2
import PackageDescription
let package = Package(
name: "DemoSPM",
products: [
.library(name: "DemoSPM", targets: ["DemoSPM"]),
],
dependencies: [
.package(url: "https://github.com/Quick/Quick", from: "3.0.0"),
],
targets: [
.target(name: "DemoSPM", dependencies: []),
.testTarget(name: "DemoSPMTests", dependencies: [
.target(name: "DemoSPM"),
.product(name: "Quick", package: "Quick"),
]),
]
)