-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Boost-locale compiled with vcpkg won't pass program linking #190
Comments
In my personal opinion I'd avoid using Most compilers incuding MSVC support utf-8 strings in |
Thank you very much for your reply, I now understand that I probably shouldn't have used And I realized that I misplaced my second image, (fixed), it should be a linking error generated by the following code: (same as shown by Compiler Explorer) std::string u8ToGbk(const std::string &U8Str) {
return boost::locale::conv::from_utf(U8Str, "GBK");
} I'm attaching my
|
Although there are issues with As for the linker error:
-> Setting Check how to use vcpkg with CMake and maybe reconfigure from a clean build dir to avoid having cached variables from a previous run interfere. |
Thank you, I've since recompiled boost and flushed the cmake cache and it works fine, but I hadn't figured out at the time why it was still an error in |
When I try to use boost::locale::conv::from_utf he never works well!
When I compile code like this with a version of x86-windows boost-locale installed by vcpkg (no icu backend installed) I get this linking problem: unresolved external command
But it links successfully when I use the following code, which seems to solve my problem
msvc 17.7.0 c++20
But the situation is even worse when I'm using the version of x86-windows-static installed by vcpkg, and I can barely use the function whether it's using u8 or std::string
msvc 17.7.0 c++20
Here's my example on compoler explorer (https://godbolt.org/z/M51oMzYec), which seems to be consistent with the problem I'm having
The text was updated successfully, but these errors were encountered: