<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Using "swift" as an interpreter definitely ought to work (including with XCTest), but it hasn't been a focus yet, so if you get the chance please also file a bug at <a href="http://bugs.swift.org" class="">bugs.swift.org</a>.</div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 7, 2015, at 21:37, Mish Awadah via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Don’t use “swift” unless you want to run the REPL. Here’s how you should build a package that runs tests: <div class=""><br class=""></div><div class=""><div class="">local@ubuntu:~/Documents$ mkdir XTest</div><div class="">local@ubuntu:~/Documents$ cd XTest/</div><div class="">local@ubuntu:~/Documents/XTest$ touch Package.swift</div><div class="">local@ubuntu:~/Documents/XTest$ emacs -nw main.swift</div><div class="">local@ubuntu:~/Documents/XTest$ swift build</div><div class="">Compiling Swift Module 'XTest' (1 sources)</div><div class="">Linking Executable: .build/debug/XTest</div><div class="">local@ubuntu:~/Documents/XTest$ .build/debug/XTest</div><div class="">Total executed 0 tests, with 0 failures (0 unexpected) in -nan (0.0) seconds</div></div><div class=""><br class=""></div><div class="">- mish</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 7, 2015, at 9:26 PM, Stepan Hruda via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I’m having a hard time linking against XCTest on Linux. The absolute minimal example: <div class=""><br class=""><div class=""><div class="">import XCTest</div><div class="">XCTMain([])</div><div class=""><br class=""></div><div class="">being run through `swift main.swift` outputs "LLVM ERROR: Program used external function '_TF6XCTest7XCTMainFGSaPS_10XCTestCase__T_' which could not be resolved!”.</div></div><div class=""><br class=""></div><div class="">Could anyone nudge me in the right direction?</div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=xTF6JWnt2pl7kNka7081D3VajDoXFZTI5JEuSuQLncr0DAizktgFWgQQszb5C6pAGjcv9-2BvXbmnHmVcOi9O5LCxZpFxvwGxPMeZeq72VAQY4h9L7Gh39dHtW-2F97OudQAe9A4-2FozBfGMBRcVZmTyD4boXDbWGcW0PXklfKEJ8ZohwPsVEX8jZG0l6k0uvR-2BK9sTTMPXmCq0vwI2Fa9yKD6ql1FBrVdlOmDkCq-2BJbi8jg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=xTF6JWnt2pl7kNka7081D3VajDoXFZTI5JEuSuQLncrExO8e3V67ZlxcmEdmeKUdUVusxAK7FPpJ5su8Dp2JRKfQvpvj1l9c8hKjfMukmqx7pUN8QgT0MiWmxJVthpjTVh-2FCFrAY4A8Ell8gNIH5OFCVVFC3jVWtsNFQ9ZjPBkGyhw-2BRDdsO-2F0kxBqygo59uVFrd-2FwK-2F3V-2FDNCn5mosmje-2BtsESTAC0PnpYT-2F7tROH0-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></body></html>