<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">We don't currently build static versions of the other libraries (Foundation, XCTest), or a support process for picking them up.<div class=""><br class=""></div><div class=""><div class="">This is covered by:</div><div class=""> <a href="https://bugs.swift.org/browse/SR-648" class="">https://bugs.swift.org/browse/SR-648</a></div></div><div class=""><br class=""></div><div class="">As you note, it largely works for Swift-only, so this is feasible but we need someone to drive it. Are you interested in working on it?</div><div class=""><br class=""></div><div class=""> - Daniel</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 1, 2016, at 9:13 AM, Joel Hughes 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=""><div class="gmail_default" style="font-family:courier new,monospace">Hi,<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">I'm attempting to get a statically linked binary and am running into errors.<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">I'm using Swift 3 Preview 6 on Ubuntu.<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">Regular _swift build_ and _swift test_ are all running fine.<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">I can produce a static binary for a simple "hello world" using:<br class=""><br class="">swift build -c release -Xswiftc -static-stdlib<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">(although I do get error while loading shared libraries: libicui18n.so.55 when running in a basic vm).<br class=""></div><div class="gmail_default" style="font-family:courier new,monospace"><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">However I can't compile a more complicated project. It's only dependency is Foundation (it uses NSUUID, and JSON) and can't seem to find them.<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">I get a stream of errors, examples:<br class=""><br class="">Linking ./.build/release/joke<br class="">/usr/bin/ld.gold: error: cannot find -lFoundation<br class="">...<br class="">error: undefined reference to '_TMaC10Foundation6NSUUID'<br class="">...<br class="">error: undefined reference to '_TFC10Foundation6NSUUIDCfT10uuidStringSS_GSqS0__'<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">Any pointers or advice much appreciated.<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">Thanks<br class=""><br class=""></div><div class="gmail_default" style="font-family:courier new,monospace">Joel<br class=""></div></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=""></div></body></html>