1

I am a newbie to the QT application. 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 instead I have msvc 2017 installed on my pc. When Rebuilding (after Qmake) the received code I am getting below issue.

Can anyone help me out to get rid of this issue also Looking forward to get your advise on configuring the Qtcreator project and build setting.

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. enter image description here

The below is my Kit setting,

enter image description here

Abu Muhammad
  • 421
  • 2
  • 13
  • 1
    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 ? – SaddamBinSyed May 24 '18 at 08:03
  • Yes, The exe name and lib name are not same , The lib name is "umxPrevLib.dll" and exe name is "umxPrevViewer.exe" – Abu Muhammad May 24 '18 at 08:09
  • Possible duplicate of [Qt error: LNK1181: cannot open input file 'debug\main.obj'](https://stackoverflow.com/questions/18604302/qt-error-lnk1181-cannot-open-input-file-debug-main-obj) – JustWe May 24 '18 at 09:11

0 Answers0