Swift on Os X Compiling for Linux

How to build a swift executable for Linux on macOS

This just means it couldn't locate the linked library. If your libswiftCore.so located at /usr/lib/swift/linux you can run LD_LIBRARY_PATH=/usr/lib/swift/linux ./<your executable for linux> and it will work like a charm.

You can also set LD_LIBRARY_PATH variable to just execute the binary.

Cross-compile Swift code for Raspberry Pi on macOS

To answer my own question, the current best solution (very recent) is:
https://github.com/CSCIX65G/swift-mac2arm-x-compile-toolchain

That provides the needed toolchains, etc. for building on macOS for the R Pi.
Best instructions for remote debugging (using lldb) can be found here:
https://lldb.llvm.org/use/remote.html

Note that on macOS you need to use the version of lldb provided by the toolchain, e.g.:

[path_to_toolchains]/Toolchains/arm64-swift.xctoolchain/usr/bin/lldb -o "platform select remote-linux" -o "platform connect connect://ipaddress:port" -o "file ./remoteProgram"

Still looking to connect the lldb debugger to Xcode run on the Mac. If that can be done, the development cycle is complete.

Now that Swift is open sourced, can I write and compile iOS apps on a computer that isn't a Mac?

There's a huge difference between the Swift language being available on other platforms such as Linux and being able to create OS X or iOS apps. OS X and iOS require many specific frameworks that will never be part of the basic open sourced language.

The open source Swift will let you write general programs in the Swift language.

The creation of iOS and OS X apps still requires a much larger infrastructure and toolset only available on a Mac.

tl;dr; - No. You still need a Mac to write iOS and OS X apps with Swift.

Is it possible to port Apple .frameworks files to Linux?

No. CoreBluetooth is a component of macOS, and is not available on Linux.



Related Topics



Leave a reply



Submit