[swift-users] Using C++ libraries in Swift projects?

Ethin Probst harlydavidsen at gmail.com
Fri Jan 13 10:18:47 CST 2017

Hello all,
I was wondering how I could go about using the Boost library project
(among others) in swift? For instance, how would I write the following
program in swift?
#include <boost/log/trivial.hpp>

int main(int, char*[])
    BOOST_LOG_TRIVIAL(trace) << "A trace severity message";
    BOOST_LOG_TRIVIAL(debug) << "A debug severity message";
    BOOST_LOG_TRIVIAL(info) << "An informational severity message";
    BOOST_LOG_TRIVIAL(warning) << "A warning severity message";
    BOOST_LOG_TRIVIAL(error) << "An error severity message";
    BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message";

    return 0;
Yes, I copied this program from
But I want to know how to do this so I can play around with it.
Ethin D. Probst

More information about the swift-users mailing list