mystor / rust-cpp

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

It's hard to link to staticly linked library #12

Closed uzytkownik closed 7 years ago

uzytkownik commented 7 years ago

I get the undefined references when I'm accessing symbol from library during linking of print_sizes. As flags are passed before librust_cpp_generated archive they are not used.

mystor commented 7 years ago

Thanks for the bug report :). I've been working on a new way to get the size information in the rust macro which should be more reliable especially when the library is not complete (as the c++ dependency is linked in later). I'll try to push a new version soon.

mystor commented 7 years ago

This should be fixed by 6743f6842a05d6729aaf8d36fafa74c872e2f5cb which is in version 0.3.0 (now on crates.io). Please let me know if you still run into problems linking.