Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. undefined reference to 'std:: .... ' in libQt5WebEngineCore.so

undefined reference to 'std:: .... ' in libQt5WebEngineCore.so

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ricky9902
    wrote on last edited by
    #1

    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.so

    I've run out of ideas on how to solve it.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        add
        set(CMAKE_CXX_STANDARD 11)
        in cmake file
        and
        CONFIG += c++11
        in pro file

        17 will work as well.

        1 Reply Last reply
        1
        • R Offline
          R Offline
          Ricky9902
          wrote on last edited by
          #4

          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

          JonBJ JoeCFDJ 2 Replies Last reply
          0
          • R Ricky9902

            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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @Ricky9902
            What version of gcc and what version of libstdc++.so do you actually have? Try Googling std::__throw_out_of_range_fmt, e.g. https://github.com/BVLC/caffe/issues/4973 ?

            R 1 Reply Last reply
            1
            • JonBJ JonB

              @Ricky9902
              What version of gcc and what version of libstdc++.so do you actually have? Try Googling std::__throw_out_of_range_fmt, e.g. https://github.com/BVLC/caffe/issues/4973 ?

              R Offline
              R Offline
              Ricky9902
              wrote on last edited by Ricky9902
              #6

              @JonB
              gcc/g++ is 7.5.0
              libstdc++6 is 8.4.0 (libstdc++.so.6.0.25)
              I followed the advice from the thread you shared and (most likely due to my mistake) it somehow broke my virtual machine.

              Edit:
              Links seem fine

              1 Reply Last reply
              0
              • R Ricky9902

                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

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #7

                @Ricky9902 forget cmake if you use pro file.

                1 Reply Last reply
                1
                • R Offline
                  R Offline
                  Ricky9902
                  wrote on last edited by
                  #8

                  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!

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved