I think u r doing it wrong..QApplication and QCoreApplication are only used in executables..when u r creating a dll or lib, u dont use them..I'd suggest u make two projects in Visual studio..one u set as a startup project which will produce an exe, in there, u create a QApplication..in other project u create a dll and u use it with the exe