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. error: LNK1181: cannot open input file 'release\main.obj'
Forum Updated to NodeBB v4.3 + New Features

error: LNK1181: cannot open input file 'release\main.obj'

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 3.2k 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.
  • A Offline
    A Offline
    AbuMuhammad Hussain
    wrote on 24 May 2018, 07:26 last edited by AbuMuhammad Hussain
    #1

    Hi all,
    I am a newbie to the QT world. I got some QT based project from my vendor. The sample application is built on QT 5.8.0 msvc2013 32 bit/64 bit, But I don't have msvc 2013 but I have msvc 2017 installed on my pc. When building the received code I am getting below issue when rebuilding (after Qmake).

    Can anyone help me out to get rid of this issue?

    error: LNK1181: cannot open input file 'release\main.obj'.
    The kit Desktop Qt 5.8.0 MSVC2017 64bit has configuration issues which might be the root cause for this problem.
    When executing step "Make"

    The Project.Pro file code,

    #-------------------------------------------------
    #
    # Project created by QtCreator 2016-09-21T09:39:10
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += Win64
    #CONFIG += console
    
    Win64 {
        TARGET_NAME = umxPrevViewer64
    } else {
        TARGET_NAME = umxPrevViewer
    }
    
    TEMPLATE = app
    
    
    FORMS    += mainwindow.ui \
                formmain.ui \
                formpreview.ui \
                formenroll.ui \
                formrecog.ui
    
    CONFIG(debug, debug|release) {
    #    DESTDIR = build/debug
        CMI_DEBUG = d
    } else {
    #    DESTDIR = build/release
        CMI_DEBUG =
    }
     
    message("release_build_mode ")
    win32-msvc2017 {
        message("win32-msvc2017 ")
    
        Win64 {
            LIBS += -L"../lib/PocoWin64" \
                -lPocoFoundation$${CMI_DEBUG} \
                -lPocoXML$${CMI_DEBUG} \
                -lPocoUtil$${CMI_DEBUG} \
                -lPocoNet$${CMI_DEBUG} \
                -lPocoJSON$${CMI_DEBUG}
        } else {
           LIBS += -L"../lib/PocoWin" \
                -lPocoFoundation$${CMI_DEBUG} \
                -lPocoXML$${CMI_DEBUG} \
                -lPocoUtil$${CMI_DEBUG} \
                -lPocoNet$${CMI_DEBUG} \
                -lPocoJSON$${CMI_DEBUG}
        }
    
        CONFIG(debug, debug|release) {
     message("win32-msvc2017 32")
            Win64 {
                DESTDIR = "..\\bin\\windows\\debug64\\"
                LIBS += "..\\bin\\windows\\debug64\\umxPrevLib64d.lib"
            } else {
                DESTDIR = "..\\bin\\windows\\debug\\"
                LIBS += "..\\bin\\windows\\debug\\umxPrevLibd.lib"
            }
        } else { message("win32-msvc2017 64")
            Win64 {
                DESTDIR = "..\\bin\\windows\\release64\\"
                LIBS += "..\\bin\\windows\\release64\\umxPrevLib64.lib"
            } else {
                DESTDIR = "..\\bin\\windows\\release\\"
                LIBS += "..\\bin\\windows\\release\\umxPrevLib.lib"
            }
        }
    
        TARGET = $${TARGET_NAME}
    
    
        CMI_HOME = "../include/umxPrevLib"
        POCO_HOME = "../include"
    }  
    
    #INCLUDEPATH += $${POCO_HOME}
    INCLUDEPATH += ../include
    
    SOURCES += main.cpp\
        mainwindow.cpp \
        formmain.cpp \
        formpreview.cpp \
        formenroll.cpp \
        formrecog.cpp \
        restsend.cpp \
        restrecv/handler/LockRequestHandlerM.cpp \
        restrecv/handler/ControlRequestHandlerM.cpp \
        restrecv/restrecvrun.cpp \
        restrecv/restrecv.cpp \
        rs232.c
    
    HEADERS  += mainwindow.h \
        ../include/umxPrevLib/requestdatatype.h \
        ../include/umxPrevLib/umxprevlib.hpp \
        formmain.h \
        global.h \
        formpreview.h \
        formenroll.h \
        formrecog.h \
        restsend.h \
        restrecv/HTTPRequestHandlerFactory.h \
        restrecv/Locker.h \
        restrecv/handler/HTTPRequestVerbHandlerM.h \
        restrecv/handler/LockRequestHandlerM.h \
        restrecv/handler/ControlRequestHandlerM.h \
        restrecv/restrecvrun.h \
        restrecv/restrecv.h \
        rs232.h
    
     
    RESOURCES += \
        images.qrc
    

    The below is my project Build setting.

    0_1527146462666_96af2a6d-bfb5-413d-a054-01ae6c2114d2-image.png

    The below is my Kit setting,

    0_1527146749829_cd74f06d-39a9-4929-a781-0b872a8602cd-image.png

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 24 May 2018, 07:48 last edited by
      #2

      Hi and welcome to devnet,

      You should not set DESTDIR as you might be conflicting with the shadow build.

      Something strange here, you seem to be willing to link a library that has the same name as your application. Is that the case ?

      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
      • A Offline
        A Offline
        AbuMuhammad Hussain
        wrote on 24 May 2018, 07:52 last edited by
        #3

        @SGaist , Thanks for the reply. yes both are same. If possible could you advise me about more in detail?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AbuMuhammad Hussain
          wrote on 24 May 2018, 08:06 last edited by
          #4

          @SGaist ,

          1. In addition to above my comment, The application name is "umxPrevViewer.exe" and lib name is "umxPrevLib.dll",
          2. I am building this with the VS2017 compiler for 64 bit on my Windows 7 64 bit PC.
          3. So Can you advise about the Kit configurations are correct? and As you suggest, Instead of DESTDIR what is the right tag to use there? please advise
          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 24 May 2018, 20:18 last edited by
            #5

            Where and when are you building that library ?

            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

            1/5

            24 May 2018, 07:26

            • Login

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