1

I have Swift code that wraps a C-library.

I want to build and test it under Linux.

How should I build the library, associated tests and run the tests?

I was tempted by the idea of creating a Swift Package but I'm not sure if I can use a C-library as part of the package if I do that.

jbcoe
  • 3,611
  • 1
  • 30
  • 45
  • look at https://www.raywenderlich.com/122189/introduction-to-open-source-swift-on-linux – Zyntx May 12 '18 at 14:11
  • This tutorial looks generally useful but it's the requirement for C-library inclusion that's tricky. – jbcoe May 14 '18 at 08:38
  • Yes, figuring out the linkage is a step by step work. Take a look at https://stackoverflow.com/questions/36570497/compile-c-code-and-expose-it-to-swift-under-linux/36637270#36637270 – Zyntx May 14 '18 at 08:53

0 Answers0