Using Linux C Libraries Directly From Swift

Hey all!! I am new to the swift world and have a question about using system .h header files directly from swift. I went around and did find some answers on module.modulemap files in xcode but none directly from linux that I found worked for me. I am using Linux with swift package manager and the experience has been amazing so far, so props to the swift team!

Okay so my question comes as I'm trying to use X11 system modules in swift to draw UI on Ubuntu GNOME. What is the best way to go about doing this in a SPM Executable project with multiple targets. I would like to avoid typing any C code or .h files if possible. Sorry about my newbe question just wanted to ask for some guidance/help.

1 Like

There is a large section on this in the SPM docs.

Terms of Service

Privacy Policy

Cookie Policy