I need to migrate a very large, very old MFC application to Qt. I have been working with the (excellent) migration walkthrough (walkthrough doc - highly recommended for anyone trying something similar). I am trying to replicate Step 2 - merge MFC and QT event loops and instantiate QApplication. There is an "if defined" in qmfcapp.h for _AFXDLL that enables QTWINMIGRATE_WITHMFC. If I try to compile my application with this flag (it's for compiling a DLL, I'm trying to get a .lib), it errors with undefined functions in qtmfcapp. If I compile with the standard lib flag, it compiles, but won't link. I've tried setting the link libraries to everything under the sun - including compiling them with both/neither flags. The QT Migration Walkthrough Step 2 will compile AND link ... with output as application, dll or lib. Why? I can't find any way to set my application up to behave the same way as the example! Any assistance is much appreciated.