Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. error: undefined reference to 'cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'

error: undefined reference to 'cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 2 Posters 4.7k 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.
  • jsulmJ jsulm

    @swansorter said in error: undefined reference to 'cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':

    LIBS += -L/usr/local/arm/opencv-arm/lib -I/usr/local/arm/opencv-arm/include/opencv4 -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_objdetect

    What is this?! Why do you add include folder to the libs search paths?
    What are the names of the libs inside /usr/local/arm/opencv-arm/lib?

    S Offline
    S Offline
    swansorter
    wrote on last edited by
    #3

    @jsulm
    sorry it is
    LIBS += -L/usr/local/arm/opencv-arm/lib -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_objdetect

    Screenshot from 2021-03-11 17-21-01.png

    jsulmJ 1 Reply Last reply
    0
    • S swansorter

      @jsulm
      sorry it is
      LIBS += -L/usr/local/arm/opencv-arm/lib -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_objdetect

      Screenshot from 2021-03-11 17-21-01.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @swansorter Did you try full rebuild after fixing pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • jsulmJ jsulm

        @swansorter Did you try full rebuild after fixing pro file?

        S Offline
        S Offline
        swansorter
        wrote on last edited by
        #5

        @jsulm yess sir same error

        S 1 Reply Last reply
        0
        • S swansorter

          @jsulm yess sir same error

          S Offline
          S Offline
          swansorter
          wrote on last edited by
          #6

          @swansorter The m

          jsulmJ 1 Reply Last reply
          0
          • S swansorter

            @swansorter The m

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #7

            @swansorter Actually you should install the libs/headers in your sysroot

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            0
            • jsulmJ jsulm

              @swansorter Actually you should install the libs/headers in your sysroot

              S Offline
              S Offline
              swansorter
              wrote on last edited by
              #8

              @jsulm how to install the libs/headers in my sysroot

              jsulmJ 1 Reply Last reply
              0
              • S swansorter

                @jsulm how to install the libs/headers in my sysroot

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @swansorter Simply copy them to your sysroot...

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                S 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @swansorter Simply copy them to your sysroot...

                  S Offline
                  S Offline
                  swansorter
                  wrote on last edited by swansorter
                  #10

                  @jsulm what i need to copy and in sysroot where i need to paste?

                  jsulmJ 1 Reply Last reply
                  0
                  • S swansorter

                    @jsulm what i need to copy and in sysroot where i need to paste?

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @swansorter Libs to: /opt/rootfs-s5p4418/usr/lib
                    Include files to: /opt/rootfs-s5p4418/usr/include

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    S 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @swansorter Libs to: /opt/rootfs-s5p4418/usr/lib
                      Include files to: /opt/rootfs-s5p4418/usr/include

                      S Offline
                      S Offline
                      swansorter
                      wrote on last edited by
                      #12

                      @jsulm
                      from : usr/local/arm/opencv-arm/libs To: /opt/rootfs-s5p4418/usr/lib
                      from : usr/local/arm/opencv-arm/include To: /opt/rootfs-s5p4418/usr/include
                      ist this write?

                      jsulmJ 1 Reply Last reply
                      0
                      • S swansorter

                        @jsulm
                        from : usr/local/arm/opencv-arm/libs To: /opt/rootfs-s5p4418/usr/lib
                        from : usr/local/arm/opencv-arm/include To: /opt/rootfs-s5p4418/usr/include
                        ist this write?

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        @swansorter yes

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        S 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @swansorter yes

                          S Offline
                          S Offline
                          swansorter
                          wrote on last edited by
                          #14

                          @jsulm i followed above steps still same error

                          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