Important: Please read the Qt Code of Conduct -

How To solved this error :-1: error: No rule to make target

  • :-1: error: No rule to make target 'c:/stlRepair_file/stlonly/../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/libBufferOverflowU.a', needed by 'debug/stlonly.exe'. Stop.


  • Lifetime Qt Champion

    @vaibs1224 can you please post you pro file as text?

    does a minimal example work?


  • Hi.

    There is a code for windows shared library:


    unix {
        SOURCES += process_stub_unix.c
        solaris-.*: LIBS += -lsocket
    } else {
        SOURCES += process_stub_win.c
        LIBS += -lshell32


    LIBS          =  "C:\Windows Kits\10\lib\10.0.17763.0\um\x64\shell32.lib"

    I thinks a test shoud do by yourself for windows static library. You alse need use everything to search bufferoverflow.

    And the error say it is a 'target', maybe you can find issue from makefile.

    I found the static file extension is .a, are you sure you make it at windows, I'm confused.

  • @aha_1980


    Project created by QtCreator 2019-08-30T13:32:14


    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = stlonly
    TEMPLATE = app

    The following define makes your compiler emit warnings if you use

    any feature of Qt which has been marked as deprecated (the exact warnings

    depend on your compiler). Please consult the documentation of the

    deprecated API in order to know how to port your code away from it.


    You can also make your code fail to compile if you use deprecated APIs.

    In order to do so, uncomment the following line.

    You can also select to disable deprecated APIs only up to a certain version of Qt.

    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

    CONFIG += c++11

    SOURCES +=

    HEADERS +=

    FORMS +=

    Default rules for deployment.

    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    INCLUDEPATH += C:\cygwin64\usr\include\X11
    LIBS += C:\cygwin64\usr\include\

    #INCLUDEPATH += C:\stlRepair_file
    #LIBS += -L/C:\stlRepair_file\lib\amd\winxp64\msoft14\dos_\ -lpg -lpgogl

    #INCLUDEPATH += C:\cygwin64\usr\include\X11
    #LIBS += C:\cygwin64\usr\include
    #INCLUDEPATH += C:\cygwin64\usr\include
    #LIBS += C:\cygwin64\usr\include\

    #INCLUDEPATH += -L\C:\stlRepair_file\bin
    #LIBS += -L/C:\stlRepair_file\lib\amd\winxp64\msoft14\dos_\ -lpg -lpgogl

    win32: LIBS += -L$$PWD/../lib/amd/winxp64/msoft14/dos_/ -lpg

    INCLUDEPATH += $$PWD/../
    DEPENDPATH += $$PWD/../

    win32: LIBS += -L$$PWD/../lib/amd/winxp64/msoft14/dos_/ -lpgogl

    INCLUDEPATH += $$PWD/../
    DEPENDPATH += $$PWD/../

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../lib/amd/winxp64/msoft14/dos_/ -lpgogl
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../lib/amd/winxp64/msoft14/dos_/ -lpgogl

    INCLUDEPATH += $$PWD/../
    DEPENDPATH += $$PWD/../
    #win32: LIBS += -L\C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64 -lBufferOverflow
    #INCLUDEPATH += C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64
    #LIBS += C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/' -lBufferOverflowU
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/' -lBufferOverflowU

    INCLUDEPATH += $$PWD/'../../Program Files (x86)/Windows Kits'
    DEPENDPATH += $$PWD/'../../Program Files (x86)/Windows Kits'

    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/libBufferOverflowU.a'
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/libBufferOverflowU.a'
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/BufferOverflowU.lib'
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/BufferOverflowU.lib'

    I think ,I have miss some step for linking.Please help

Log in to reply