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. LNK1107: invalid or corrupt file: cannot read at ERROR
Forum Updated to NodeBB v4.3 + New Features

LNK1107: invalid or corrupt file: cannot read at ERROR

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 13.7k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hamit1453
    wrote on last edited by
    #3

    thanks :D
    how can i fix it ?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Change all the LIBS lines from these:
      @
      LIBS += C:\Users\hamit\Desktop\opencv\release\bin\libopencv_core2410.dll
      ...
      @
      to these:
      @
      LIBS += -LC:/Users/hamit/Desktop/opencv/release/lib -lopencv_core2410
      ...
      @
      Notice "lib" instead of "bin", the -L without space before the path and -l(lowercase L) before the library name and no "lib" prefix or extension. Also \ is an escape character so either use / (recommended) or \.
      After that place the .dll files in the directory where your app executable is and also don't forget to run Build->run qmake.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hamit1453
        wrote on last edited by
        #5

        INCLUDEPATH += C:\Users\hamit\Desktop\opencv\release\install\include

        LIBS += -LC:\Users\hamit\Desktop\opencv\release\lib -lopencv_core2410
        LIBS += -LC:\Users\hamit\Desktop\opencv\release\lib -lopencv_contrib2410
        LIBS += -LC:\Users\hamit\Desktop\opencv\release\lib -lopencv_highgui2410
        LIBS += -LC:\Users\hamit\Desktop\opencv\release\lib -lopencv_imgproc2410
        LIBS += -LC:\Users\hamit\Desktop\opencv\release\lib -lopencv_calib3d2410

        i did like that but it gave me error again.. just error name changed.. its LNK1181: cannot open input file'..... '

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #6

          The '...' is very important :) It tells you which file is problematic. Did you verify that it exist at that location?

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hamit1453
            wrote on last edited by
            #7

            its 'opencv_core2410.lib'

            and i just added .dll files..not .lib's

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              Which compiler are you using ? Which compiler was used to build OpenCV ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hamit1453
                wrote on last edited by
                #9

                i did my project with visual studio 2010. i want to make ainterface with Qt 5.1

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Was OpenCV also built with VS2010 ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hamit1453
                    wrote on last edited by
                    #11

                    yes. i run my program there. just i wanted to make inrterface to my program

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      Custom OpenCV build ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • H hamit1453

                        hi guys
                        i did video processing with opencv by using visual studio. i want to make a interface. a friend suggested to me Qt to make a interface.
                        i watched a tutorial on youtube (http://www.youtube.com/watch?v=csxkdGQQgNg) but when i run it it gives me that error
                        please help me
                        and sorry my english.im still learning it.. :D

                        codes and error
                        !http://i58.tinypic.com/10p0hty.png()!

                        .pro
                        http://i59.tinypic.com/20kytyc.png

                        A Offline
                        A Offline
                        amine
                        wrote on last edited by
                        #13

                        @hamit1453

                        Hello!
                        In order to overcome this pb you should just edit the compiler. According to the video you should choose Mingw Release.

                        Go to projects ( parameter compilation) and modify it!
                        Good luck!

                        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