In my rust library I have
#[link(name = "stdc++")]
to link in the c++ libraries that some external code needs to run. This works great and I have built linux executables that work.
However, I found that on new mac OS’s
libstdc++ is present and instead you need to link
libc++ (see https://stackoverflow.com/questions/14972425/should-i-use-libc-or-libstdc) and thus my question is this:
How can I use a cfg attribute to link
libstd++ on linux and
libc++ on macos?