Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
lorik last edited by
I want to use qtwinmigrate to speak with windows messaging application. I build the dll ,included all includes and libs in visual studio 2008 project , and still have some link problem:
error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWinHost::staticMetaObject" (?staticMetaObject@QWinHost@@2UQMetaObject@@B)
What can be the problem?
koahnig last edited by
It looks like QWinHost has to be "registered":http://doc.qt.nokia.com/4.7/qmetatype.html#qRegisterMetaType with Qt
lorik last edited by
thanks for your reply
Now I have another problem in qwinhost.h :
Error 1 error C2248: 'QWidget::QWidget' : cannot access private member declared in class 'QWidget' c:\qt\4.7.2\qtwinmigrate-2.8-opensource\src\qwinhost.h 98
It's not my file . I am trying to add a new package qtwinmigrate to qt
I downloaded the qtwinmigrate-2.8-opensource and want to run the QWinHost included example
with Visual Studio 2008
I am looking for someone that already did it and succeeded
what is the right sequence of actions to make it work?
PaSt last edited by
I know, this thread is cold since more than two years, but I've got exactly the same problem as described by lorik:
first the linker error LNK2001 (after implementing the example ), second registered the QWinHost using Q_DECLARE_METATYPE(QWinHost), third got the C2248.
So if somebody knows what to do about the error C2248 or got an idea about the reason, I would be very grateful!
Using VS2008 & Qt 4.7.4.
romain06 last edited by
After some tries, I am finally able to compile QtwinMigrate library (QtSolutions_MFCMigrationFramework-head.lib) on Qt5.
But when I try to use this library with the QtwinMigrate sample code from an MFC application, I get the following link errors :
- error LNK2019: symbole externe non résolu "__declspec(dllimport) public: static class QApplication * __cdecl QMfcApp::instance()
- error LNK2019: symbole externe non résolu "__declspec(dllimport) public: __thiscall QWinWidget::QWinWidget()
- error LNK2019: symbole externe non résolu "__declspec(dllimport) public: static int __cdecl QMfcApp::run(class CWinApp *)
Do you have any idea ?
Thanks in advance,