I just posted this on StackOverflow 
<http://stackoverflow.com/questions/41290913/how-do-i-use-xcode-for-a-c-library-wrapped-in-swift>.
 Insights most welcome.

I'm trying to create an Xcode workspace that contains projects that make:

A bird dynamic library built from C source
A Cbird Swift module that wraps bird in raw Swift
A Bird Swift module that imports Cbird and wraps it in swifty Swift
A birdchirp Swift Command Line Tool that imports Bird
All of these must have an OS X Unit Testing Bundle.

I've tried various ways with various versions of Swift 3.x and snapshots to do 
this starting from Project.swift files and using swift package 
generate-xcodeproj. All of these attempts have resulted in Xcode setups that 
have various problems:

having to do a swift build first and then rooting an Xcode project in a 
directory deep within the .build directory (created by swift build) or within 
the (apparently now defunct) Packages directory
having to refer to other projects via github addresses
trouble with unit test bundles not finding Cbird
Selecting Cbird in an import Cbird source line and doing Jump to Definition 
fails to show the Swift source for Cbird.
The birdchirp project cheats and refers to Bird source files directly instead 
of depending on the Bird framework.
Extra credit:

Package.swift files that work with relative references to the other projects, 
while still allowing the projects to be mirrors of GitHub projects

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to