Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including "mio/mmap.hpp" in more than one compilation unit #81

Open
utilitydelta opened this issue Feb 3, 2022 · 2 comments
Open

Including "mio/mmap.hpp" in more than one compilation unit #81

utilitydelta opened this issue Feb 3, 2022 · 2 comments

Comments

@utilitydelta
Copy link

Hi,

I get this linker error if I have #include "mio/mmap.hpp" in more than one cpp file:

error LNK2005: "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl mio::detail::win::s_2_ws(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?s_2_ws@win@detail@mio@@ya?AV?$basic_string@_WU?$char_traits@_W@std@@v?$allocator@_W@2@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@5@@z) already defined in test.obj

Any ideas on what I can do to fix? Running x64 build on Win11.

Thanks!
Tyson

@phprus
Copy link

phprus commented Feb 3, 2022

See #71

@utilitydelta
Copy link
Author

thanks! nice one liner :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants