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. LNK1181: the input file cannot be opened "release\CameraImageWrapper.obj"
Qt 6.11 is out! See what's new in the release blog

LNK1181: the input file cannot be opened "release\CameraImageWrapper.obj"

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 755 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.
  • xlartasX Offline
    xlartasX Offline
    xlartas
    wrote on last edited by
    #1

    Re: UINT32_C' & 'UINT64_C': identifier not found error in Qt6.3.0 MSVC2019 64-bit

    I managed to fix the problem using the advice of @c-toyama. But after that I got a build error.
    LNK1181: the input file cannot be opened "release\Camera Image Wrapper.obj"

    What could be the matter? Thank u

    C 1 Reply Last reply
    0
    • xlartasX xlartas marked this topic as a regular topic on
    • xlartasX xlartas marked this topic as a question on
    • xlartasX xlartas marked this topic as a regular topic on
    • xlartasX xlartas marked this topic as a question on
    • xlartasX xlartas

      Re: UINT32_C' & 'UINT64_C': identifier not found error in Qt6.3.0 MSVC2019 64-bit

      I managed to fix the problem using the advice of @c-toyama. But after that I got a build error.
      LNK1181: the input file cannot be opened "release\Camera Image Wrapper.obj"

      What could be the matter? Thank u

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @xlartas said in LNK1181: the input file cannot be opened "release\CameraImageWrapper.obj":

      LNK1181: the input file cannot be opened "release\Camera Image Wrapper.obj"
      What could be the matter? Thank u

      The file does not exist.
      The file does exist but the spaces in the file name are a problem.

      xlartasX 1 Reply Last reply
      0
      • C ChrisW67

        @xlartas said in LNK1181: the input file cannot be opened "release\CameraImageWrapper.obj":

        LNK1181: the input file cannot be opened "release\Camera Image Wrapper.obj"
        What could be the matter? Thank u

        The file does not exist.
        The file does exist but the spaces in the file name are a problem.

        xlartasX Offline
        xlartasX Offline
        xlartas
        wrote on last edited by
        #3

        @ChrisW67 There are no spaces in the console, I do not know why it was copied like that. In the folder with the build, only ".i" files are generated, there is no .obj, apparently the error occurs before they are created. But if I disable QZXing.pri, everything builds well.

        C 1 Reply Last reply
        0
        • xlartasX xlartas

          @ChrisW67 There are no spaces in the console, I do not know why it was copied like that. In the folder with the build, only ".i" files are generated, there is no .obj, apparently the error occurs before they are created. But if I disable QZXing.pri, everything builds well.

          C Offline
          C Offline
          ChrisW67
          wrote on last edited by ChrisW67
          #4

          @xlartas So you have not removed the temporary QMAKE_CXXFLAGS += -P made to debug the problem in the post you linked. The /P option suppresses compilation. It does not produce an .obj file....

          xlartasX 1 Reply Last reply
          0
          • C ChrisW67

            @xlartas So you have not removed the temporary QMAKE_CXXFLAGS += -P made to debug the problem in the post you linked. The /P option suppresses compilation. It does not produce an .obj file....

            xlartasX Offline
            xlartasX Offline
            xlartas
            wrote on last edited by
            #5

            @ChrisW67 What should I do then? I'm a python backend developer and I don't know much about C++. If I delete QMAKE_CXXFLAGS += -P, then I will start having errors like in that topic.

            1 Reply Last reply
            0
            • xlartasX Offline
              xlartasX Offline
              xlartas
              wrote on last edited by
              #6

              @ChrisW67 Its's my .pro

              QT += core gui widgets concurrent network
              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
              CONFIG += c++17
              
              include(QZXing/QZXing.pri)
              QMAKE_CXXFLAGS += -P
              
              SOURCES += \
                  main.cpp \
                  scanner.cpp
              
              HEADERS += \
                  scanner.h
              
              FORMS += \
                  scanner.ui
              
              qnx: target.path = /tmp/$${TARGET}/bin
              else: unix:!android: target.path = /opt/$${TARGET}/bin
              !isEmpty(target.path): INSTALLS += target
              
              xlartasX 1 Reply Last reply
              0
              • xlartasX xlartas

                @ChrisW67 Its's my .pro

                QT += core gui widgets concurrent network
                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                CONFIG += c++17
                
                include(QZXing/QZXing.pri)
                QMAKE_CXXFLAGS += -P
                
                SOURCES += \
                    main.cpp \
                    scanner.cpp
                
                HEADERS += \
                    scanner.h
                
                FORMS += \
                    scanner.ui
                
                qnx: target.path = /tmp/$${TARGET}/bin
                else: unix:!android: target.path = /opt/$${TARGET}/bin
                !isEmpty(target.path): INSTALLS += target
                
                xlartasX Offline
                xlartasX Offline
                xlartas
                wrote on last edited by xlartas
                #7

                @xlartas I have solved the problem. Just don't use QZXing with 6.3.2MSVC Static build qmake. Use a regular zxing-cpp built using the visual studio dev console.

                cmake -S zxing-cpp -B zxing-cpp.release -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_STANDARD=17 -A x64
                
                zxing-cpp.release -> rename -> zxing | and move to project folder
                

                Connect the library to the .pro file

                win32: LIBS += -L$$PWD/zxing/core/Release/ -lZXing
                INCLUDEPATH += G:/zxing-cpp/core/src
                DEPENDPATH += G:/zxing-cpp/core/src
                win32:!win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/ZXing.lib
                else:win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/libZXing.a
                

                Make an include. Please note that the order of imports is sometimes important.

                #include "ReadBarcode.h"
                #include <ImageView.h>
                #include <BarcodeFormat.h>
                ... and others if you need
                
                1 Reply Last reply
                0
                • xlartasX xlartas has marked this topic as solved on

                • Login

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