Hallo,
I have downloaded windows version of qt 5.5.1 - mingw.
In the directory C:/Qt/5.5/mingw492_32/lib there are a lot of .a files, like libQt5Core.a and libQt5Gui.a, so, according to my opinion, I suppose to have the static lib installed. The dll files are located in C:\Qt\5.5\mingw492_32\bin

I create a new "Qt application Project", and I modify .pro as follows:
Qt Code:
  1. QT += core gui
  2.  
  3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  4.  
  5. TARGET = prova
  6. TEMPLATE = app
  7.  
  8. QMAKE_LFLAGS += -static # try to link the static library
  9. QMAKE_LFLAGS += -Wl,-Map=prova.map # let's produce the map file
  10.  
  11. SOURCES += main.cpp\
  12. dialog.cpp
  13.  
  14. HEADERS += dialog.h
  15.  
  16. FORMS += dialog.ui
To copy to clipboard, switch view to plain text mode 

it seems tha all works. The linker command line is:
Qt Code:
  1. g++ -static -Wl,-Map=prova.map -Wl,-subsystem,windows -mthreads -o debug\prova.exe debug/main.o debug/dialog.o debug/moc_dialog.o -lmingw32 -LC:/Qt/5.5/mingw492_32/lib -lqtmaind -lshell32 -lQt5Widgetsd -lQt5Guid -lQt5Cored
To copy to clipboard, switch view to plain text mode 
So it seems to use the right directory, and in the map file there are lines like:
Qt Code:
  1. .text 0x00402c40 0x8 C:/Qt/5.5/mingw492_32/lib\libQt5Cored.a(d002900.o)
  2. 0x00402c40 QObject::timerEvent(QTimerEvent*)
  3. .text 0x00402c48 0x8 C:/Qt/5.5/mingw492_32/lib\libQt5Cored.a(d002895.o)
  4. 0x00402c48 QObject::childEvent(QChildEvent*)
  5. .text 0x00402c50 0x8 C:/Qt/5.5/mingw492_32/lib\libQt5Cored.a(d002902.o)
  6. 0x00402c50 QObject::customEvent(QEvent*)
To copy to clipboard, switch view to plain text mode 

So I thought that the exe was stand alone, but if I try to run it fails because it want libQt5Cored.dll.
Why?
Where am I wrong?

best regards
Max