Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 81271)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 81272)
@@ -27,4 +27,5 @@
 # include <QLineEdit>
 # include <QListView>
+# include <QMainWindow>
 # include <QMenuBar>
 # include <QPainter>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRestorableGeometry.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRestorableGeometry.h	(revision 81271)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRestorableGeometry.h	(revision 81272)
@@ -143,3 +143,12 @@
 };
 
+/** Explicit QIWithRestorableGeometry instantiation for QMainWindow class.
+  * @note  On Windows it's important that all template cases are instantiated just once across
+  *        the linking space. In case we have particular template case instantiated from both
+  *        library and executable sides, - we have multiple definition case and need to strictly
+  *        ask compiler to do it just once and link such cases against library only.
+  *        I would also note that it would be incorrect to just make whole the template exported
+  *        to library because latter can have lack of required instantiations (current case). */
+template class SHARED_LIBRARY_STUFF QIWithRestorableGeometry<QMainWindow>;
+
 #endif /* !FEQT_INCLUDED_SRC_globals_QIWithRestorableGeometry_h */
