When attempting to run a shared library I've built I am hitting the error when trying to load the shared library (within Linux) undefined symbol: _ZSt10from_charsPKcS0_ReSt12chars_format
. Performing nm --unmangle
shows that the lines that are causing an issue are:
U std::from_chars(char const*, char const*, double&, std::chars_format)
U std::from_chars(char const*, char const*, long double&, std::chars_format)
U std::from_chars(char const*, char const*, float&, std::chars_format)
After trying to figure this out, as it is quite weird coming from the standard library, is that it is a known and common issue. Some similar threads are:
- std::to_chars compile but not linking on MacOS / clang
- Compile error when calling std::from_chars with a double in libc++
Looking at: https://en.cppreference.com/w/cpp/compiler_support also confirms this with the line relating to this problem being: P2291R3
.
I think this is coming from the libpqxx
library I have included as it is not in any of my code therefore, my question:
Is there any method out there to deal with this?
Could I create a definition for this just to overload it? Are this going to be implemented soon? Or do I have to only change the libpqxx
library? At least the version.
- Linux: Ubuntu 20.04
- Compiler: G++-10
Update
From one of the comments below pointed out that:
- Was not looking at the wrong list
- Upgrading to the most up to date g++11 solved this issue