C++ std lib version mismatch errors while using skia

85 views
Skip to first unread message

Kiara Patani

unread,
Jun 2, 2023, 8:29:18 AM6/2/23
to skia-discuss
Hii team,

I am getting linking errors while using skia and the reason being that my project uses C++14 and skia uses C++17.

Errors :-
ld.lld: error: undefined symbol: std::cout
ld.lld: error: undefined symbol: std::basic_ostream<char, std::char_traits<char>>& std::operator<<<std::char_traits<char>>(std::basic_ostream<char, std::char_traits<char>>&, char const*)
ld.lld: error: undefined symbol: std::filesystem::status(std::filesystem::__cxx11::path const&)


To upgrade my project to C++17 will require lot more changes, so I am trying a alternative solution in which I have built a static wrapper library over skia and now if I embed C++ standard library in it and then finally link this new custom wrapper library with my project , I was thinking it should work properly. But still it gives some errors.
Is there any other solution out there for C++ version mismatch issue ?

Thanks and Regards, 
Kiara Patani.

K. Moon

unread,
Jun 2, 2023, 11:07:35 AM6/2/23
to skia-d...@googlegroups.com
This would violate the One Definition Rule (ODR), and therefore is considered Undefined Behavior and not supported.

Skia actually used to have this problem with Chromium, and had to fix it. You might be able to find a solution with your specific toolchain, but it's not going to work in general, so I think you're on your own.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/473d4ff5-ae3d-402e-b88e-827be4bfbc87n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages