Error Building Qt Project MSVC 2017 / Warning in Qt Creator



  • Hello
    I have Qt 5.8.0 Static MSVC 2017 with Qt Creator 4.2.1
    when I open my project that worked fine on previous version but now I get this warning from Qt Creator
    but it builds alright and works fine

    :-1: warning: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\cl.exe" is used by qmake, but "" is configured in the kit.
    Please update your kit or choose a mkspec for qmake that matches your target environment better.
    

    and when I try to build using VS 2017 I get this error and build fails

    1>c1xx : fatal error C1083: Cannot open source file: 'D:\Downloads\qtemr\smartclinic2_plugin_import.cpp': No such file or directory
    1>Done building project "qtemr.vcxproj" -- FAILED.
    
    

    please help !!


  • Moderators

    @dr3mro MSVC2017 is not yet officially supported by Qt as far as I know.
    Regarding first problem: you should check your Kit, how is it configured (what is the compiler?)?

    Second issue: can you show your pro file?



  • My pro file

    #-------------------------------------------------
    #
    # Project created by QtCreator 2014-06-30T03:16:41
    #
    #-------------------------------------------------
    QT += core gui xml network printsupport sql widgets
    
    msvc:QMAKE_CFLAGS_RELEASE += -O2 -Oy -Os
    msvc:QMAKE_CXXFLAGS_RELEASE += -O2 -Oy -Os
    
    gcc:QMAKE_CFLAGS_RELEASE += -s -O2 -march=i686 -mtune=generic -fomit-frame-pointer
    gcc:QMAKE_CXXFLAGS_RELEASE += -s -O2 -march=i686 -mtune=generic -fomit-frame-pointer -fno-rtti -fno-exceptions
    gcc:QMAKE_CXXFLAGS = -std=c++11
    gcc:QMAKE_LFLAGS += -static-libgcc -static-libstdc++ --enable-stdcall-fixup -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc
    
    msvc:LIBS += -L$$PWD/zlib/msvc -lzlib
    gcc:LIBS += -L$$PWD/zlib/mingw -lzdll
    
    build_nr.commands = $$PWD/../qtemr/build_inc.bat
    build_nr.depends = FORCE
    QMAKE_EXTRA_TARGETS += build_nr
    PRE_TARGETDEPS += build_nr
    
    CONFIG += -static openssl-linked
    TARGET = smartClinic2
    TEMPLATE = app
    
    SOURCES += main.cpp\
            mainwindow.cpp \
            aboutwindow.cpp \
            squeeze.cpp \
            settingsclass.cpp \
            emptyprofiles.cpp \
            regapp.cpp \
            patientlist.cpp \
            visitsbox.cpp \
            userpass.cpp \
            listeditor.cpp \
            inveslist.cpp \
            patient.cpp \
            mymessagebox.cpp \
            visits.cpp \
            textedit.cpp \
            drugindex.cpp \
            zip.cpp \
            backup.cpp \
            printdrugs.cpp \
            drugstable.cpp \
            apptrayicon.cpp \
            patienttable.cpp \
            sqlbase.cpp \
        visitslist.cpp \
        sqlcore.cpp \
        sqlextra.cpp \
        mcompleter.cpp \
        mlineedit.cpp \
        datahelper.cpp \
        dataiohelper.cpp \
        investtable.cpp \
        massistant.cpp \
        singleinstance.cpp \
        mcheckbox.cpp \
        addsiblings.cpp \
        msiblings.cpp \
        surgicalnotes.cpp \
        msurgicalnotes.cpp \
        surgicalnoteeditor.cpp \
        smtp.cpp \
        email.cpp \
        internet.cpp \
        richtexteditor.cpp \
        colorpicker.cpp \
        colorbutton.cpp \
        printbutton.cpp \
        msortfilterproxymodel.cpp \
        simplecrypt.cpp \
        m_scolorbutton.cpp \
        wm_completerloader.cpp \
        wm_drugmodelloader.cpp \
        wm_invmodelloader.cpp \
        wm_visitlistloader.cpp \
        wm_visiticonloader.cpp \
        drugexapnder.cpp \
        mcalendarwidget.cpp \
        excelexport.cpp \
        vitalbox.cpp \
        mpatientfilter.cpp \
        vtypecombobox.cpp \
        mlabelmsg.cpp \
        getinvestigationname.cpp \
        syncbutton.cpp \
        miniupdater.cpp \
        filegrabber.cpp \
        mship.cpp \
        wm_mship.cpp \
        ztableview.cpp \
        xcheckbox.cpp \
        xlineedit.cpp \
        xspinbox.cpp \
        xdatetimeedit.cpp \
        xlistwidget.cpp \
        xcombobox.cpp \
        navarrows.cpp \
        patientnumber.cpp \
        mpushbutton.cpp \
        favouritedrugseditor.cpp \
        favouritedosedelegate.cpp \
        servicemodel.cpp \
        spinboxdelegate.cpp \
        showaltdrugs.cpp \
        wm_visitsaver.cpp \
        wm_add2completer.cpp \
        genericonlinesearch.cpp \
        clickablelabel.cpp \
        conditionsedit.cpp \
        checkablesortfilterproxymodel.cpp \
        conditionswidget.cpp \
        mpatient.cpp \
        errorlogviewer.cpp \
        mdialog.cpp \
        welcomebanner.cpp \
        mmessagebox.cpp \
        msettings.cpp
    
    HEADERS  += mainwindow.h \
            aboutwindow.h \
            squeeze.h \
            settingsclass.h \
            emptyprofiles.h \
            regapp.h \
            patientlist.h \
            visitsbox.h \
            build.h \
            userpass.h \
            listeditor.h \
            inveslist.h \
            patient.h \
            mymessagebox.h \
            visits.h \
            textedit.h \
            drugindex.h \
            drug.h \
            zipreader.h \
            zipwriter.h \
            zconf.h \
            zlib.h \
            backup.h \
            printdrugs.h \
            drugstable.h \
            apptrayicon.h \
            patienttable.h \
            sqlbase.h \
        visitslist.h \
        sqlcore.h \
        sqlextra.h \
        mcompleter.h \
        mlineedit.h \
        datahelper.h \
        dataiohelper.h \
        investtable.h \
        massistant.h \
        singleinstance.h \
        globalvariables.h \
        mcheckbox.h \
        addsiblings.h \
        msiblings.h \
        surgicalnotes.h \
        msurgicalnotes.h \
        surgicalnoteeditor.h \
        smtp.h \
        email.h \
        internet.h \
        richtexteditor.h \
        colorpicker.h \
        colorbutton.h \
        printbutton.h \
        msortfilterproxymodel.h \
        simplecrypt.h \
        m_scolorbutton.h \
        wm_completerloader.h \
        wm_drugmodelloader.h \
        wm_invmodelloader.h \
        wm_visitlistloader.h \
        wm_visiticonloader.h \
        drugexapnder.h \
        mcalendarwidget.h \
        excelexport.h \
        vitalbox.h \
        mpatientfilter.h \
        vtypecombobox.h \
        mlabelmsg.h \
        getinvestigationname.h \
        syncbutton.h \
        miniupdater.h \
        filegrabber.h \
        mship.h \
        wm_mship.h \
        ztableview.h \
        xcheckbox.h \
        xlineedit.h \
        xspinbox.h \
        xdatetimeedit.h \
        xlistwidget.h \
        xcombobox.h \
        navarrows.h \
        patientnumber.h \
        mpushbutton.h \
        favouritedrugseditor.h \
        favouritedosedelegate.h \
        servicemodel.h \
        spinboxdelegate.h \
        showaltdrugs.h \
        wm_visitsaver.h \
        wm_add2completer.h \
        genericonlinesearch.h \
        clickablelabel.h \
        conditionsedit.h \
        checkablesortfilterproxymodel.h \
        conditionswidget.h \
        mpatient.h \
        errorlogviewer.h \
        mdialog.h \
        welcomebanner.h \
        mmessagebox.h \
        msettings.h \
        staticstrings.h \
        mdebug.h
    
    FORMS    += mainwindow.ui \
            aboutwindow.ui \
            settingsclass.ui \
            emptyprofiles.ui \
            patientlist.ui \
            visitsbox.ui \
            userpass.ui \
            listeditor.ui \
            inveslist.ui \
            drugindex.ui \
            backup.ui \
            printdrugs.ui \
        massistant.ui \
        addsiblings.ui \
        surgicalnotes.ui \
        surgicalnoteeditor.ui \
        richtexteditor.ui \
        colorpicker.ui \
        drugexapnder.ui \
        getinvestigationname.ui \
        miniupdater.ui \
        favouritedrugseditor.ui \
        showaltdrugs.ui \
        genericonlinesearch.ui \
        conditionsedit.ui \
        errorlogviewer.ui \
        welcomebanner.ui
    
    win32:RC_FILE = MyApplication.rc
    
    OTHER_FILES += \
        MyApplication.rc \
        Graphics/appicon.ico \
        build.txt \
        Theme1.css \
        TODO.txt
    
    
    RESOURCES += \
        resources.qrc
    
    DISTFILES += \
        Graphics/newAppIcon.ico
    
    

    here is screen shot of compiler and kit
    http://imgur.com/hCU6TF0

    http://imgur.com/zObeR4y


  • Moderators

    @dr3mro I'm not sure from where D:\Downloads\qtemr\smartclinic2_plugin_import.cpp file is coming?
    I cannot find it in your pro file.
    What does build_inc.bat do?
    What about your Kit: did you check it?



  • build_inc.bat just increase the build number in file build.h so myApp about info contains build number
    here is the code

    @echo off
    set /p var= <../qtemr/build.txt
    set /a var= %var%+1
    echo %var% > ../qtemr/build.txt
    echo #ifndef BUILD > ../qtemr/build.h
    echo #define BUILD %var% >> ../qtemr/build.h
    echo #endif >> ../qtemr/build.h
    echo %var%
    
    

  • Moderators

    @dr3mro What about my other question regarding D:\Downloads\qtemr\smartclinic2_plugin_import.cpp ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.