undefined reference to 'std:: .... ' in libQt5WebEngineCore.so
-
Hi!
I'm updating a large project from 4.8.6 to 5.6.3 on Ubuntu 18.04.1 and I encountered one problem.undefined reference to 'std::_throw_out_of_range_fmt(char const, ....)@Qt_5'
undefined reference to 'std::_throw_bad_function_call()@Qt_5'
collect2:error: ld returned 1 exit status
in a file libQt5WebEngineCore.soI've run out of ideas on how to solve it.
-
How did you install the Qt version?
You've most likely an to old libstdc++ version on your system - std::throw_out_of_range(const char*) was added with c++11: https://en.cppreference.com/w/cpp/error/out_of_range -
Thank you for your replies
@Christian-Ehrlicher
I downloaded Qt from the 5.6.3 arhcives, download.qt.io. I checked and I have the highest version of libstdc++ available for ubuntu 18.04.@JoeCFD
I tried it, but the error is still the same. By cmake do you mean the qt5config.cmake?I already had CONFIG += C++11 and QMAKE_CXXFLAGS += -std=c++11 included in my .pro file.
In compile output I can see that g++ is called with -std=c++11 -
@Ricky9902
What version ofgcc
and what version oflibstdc++.so
do you actually have? Try Googlingstd::__throw_out_of_range_fmt
, e.g. https://github.com/BVLC/caffe/issues/4973 ? -
Creating new virtual Ubuntu and reinstalling all the packages and Qt seems to have solved the problem.
I belive that I destroyed some links between few files or just overwritten few .so files when I was trying to manually solve this problem.
Thank you for your replies!