mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
798 stars 44 forks source link

Fix multiple definition error on windows #54

Closed wicast closed 5 years ago

wicast commented 5 years ago

According to https://gcc.gnu.org/onlinedocs/gcc-4.4.6/gcc/Variable-Attributes.html, selectany can be used for windows. Fixes https://github.com/mystor/rust-cpp/issues/53

wicast commented 5 years ago

tested with mingw64 and msvc

ogoffart commented 5 years ago

Looks good, thanks for the patch