# Cross‐compile from WSL to Windows with SwiftPM?

**URL:** <https://forums.swift.org/t/cross-compile-from-wsl-to-windows-with-swiftpm/38728>\
**Category:** Package Manager\
**Tags:** windows, packagemanager\
**Created:** [July 24, 2020, 7:53pm UTC](https://forums.swift.org/t/cross-compile-from-wsl-to-windows-with-swiftpm/38728 "2020-07-24T19:53:49Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![SDGGiesbrecht](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sdggiesbrecht/32/4768_2.png) [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Post date:** [July 31, 2020, 1:25am UTC](https://forums.swift.org/t/cross-compile-from-wsl-to-windows-with-swiftpm/38728/11 "2020-07-31T01:25:53Z")

</div>

The COMDAT thing seems to be a bug in the compiler’s handling of a particular module—and quite possibly a clue to the SegFault errors that I kept hitting at run time with native builds of the same module. I have now successfully built half a dozen other modules.

The only thing that still isn’t working is the test executable:

```swift
/usr/bin/lld-link: error: entry point must be defined
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
[5/6] Linking MyPackagePackageTests.xctest

```

Any idea of a way to work around it?

---

_[View the full topic](https://forums.swift.org/t/cross-compile-from-wsl-to-windows-with-swiftpm/38728)._
