<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m trying to link some Swift code a C library. I have generated a Swift package for the library, but the library cannot be <i class="">directly</i>&nbsp;used from Swift – it relies on some complex macros that cannot be imported.<div class="">I’ve created C code and header files that replace these macros with variables and functions (where applicable). I’d like to be able to have this code within the package for the library and have the C code be compiled so that Swift code is linked with both it and the library.</div><div class=""><br class=""></div><div class="">I think I can have the C code be in a different package and have the library package depend on it, but I’d prefer to avoid that – using the library from Swift is <i class="">impossible</i>&nbsp;without the C bridge, so it should be part of the same package.</div><div class=""><br class=""></div><div class="">Is this possible?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Omri Mor</div></body></html>