Examples of Swift Package Manager; C, Cpp and ObjC linking examples
Examples of Swift Package Manager
Simple (automatically generated) modulemap
.
├── Sources
│ ├── CHello
│ │ └── include
│ └── Simple
└── Tests
└── SimpleTests
One of Clang package (CHello
) linked another C static library (libhello/lib/libhello.a
)
libhello.a
).
├── Sources
│ ├── CHello
│ │ ├── include
│ │ └── src
│ ├── Staticlib
│ └── libhello
│ ├── bin
│ ├── example
│ ├── include
│ ├── lib
│ ├── src
│ └── tmp
└── Tests
└── StaticlibTests
Cpp called from extern linkage C header
.
├── Sources
│ ├── CLinkage
│ └── CppHello
│ └── include
└── Tests
└── CLinkageTests
.
├── Sources
│ ├── ObjcHello
│ │ └── include
│ └── Simple
└── Tests
└── SimpleTests
.
├── Sources
│ └── GitHubLib
└── Tests
└── GitHubLibTests
.
├── Sources
│ ├── FooBar
│ │ ├── Sources
│ │ │ ├── Bar
│ │ │ ├── Foo
│ │ │ └── FooBar
│ │ └── Tests
│ │ └── FooBarTests
│ └── MultiLayer
└── Tests
└── MultiLayerTests
.
├── Sources
│ ├── Bar
│ ├── Foo
│ └── MultiModule
└── Tests
└── MultiModuleTests
.
├── Sources
│ └── Simple
└── Tests
└── SimpleTests
$ make test
$ make clean