Q:

Qt program fails to run with errors referencing libwinpthread-1

I've made a C++/OpenGL application using the Qt framework, but I cannot to run *.exe file. I always get errors with libwinpthread-1.
I already read articles about that, but all dll's are in the Qt folder, so I don't understand what the problem is. Please take a look at my *.pro file:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp \
    sliceobj.cpp

unix|win32: LIBS += -lOPENGL32
unix|win32: LIBS += -L$$PWD/../../../../5.0.2/mingw47_32/lib/ -lglut32

QMAKE_LFLAGS += -static-libgcc -static-libstdc++
QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas

INCLUDEPATH += $$PWD/../../../../5.0.2/mingw47_32/include

win32 {
    message("* Using settings for windows")
    INCLUDEPATH += "C:\\opencv\\build\\include" \
                   "C:\\opencv\\build\\include\\opencv" \
                   "C:\\opencv\\build\\include\\opencv2"

    LIBS += -L"C:\\opencv\\build\\x86\\vc11\\bin" \
        -lopencv_core247\
        -lopencv_highgui247\
        -lopencv_imgproc247\
        -lopencv_video247\

    LIBS += -L"C:\\opencv\\build\\x86\\vc11\\staticlib" \
        -lopencv_core247\
        -lopencv_highgui247\
        -lopencv_imgproc247\
        -lopencv_video247\
}

A:

Use Dependency Walker to see what exactly your code links against + Which libraries are loaded in runtime. Open your executable with DW and you will see DLL's that are linked against. They need to be present in PATH or beside your executable. Press F7 to start profiling to see which libraries are loaded in runtime. Here as snapshot:

