PDA

View Full Version : qtwinmigrate



lorik
12th September 2011, 13:12
Hi,
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?

high_flyer
13th September 2011, 09:31
What can be the problem?
Many things.
Post the full error you get - it also specifies the location where the reference to the symbol is made (where the call is).
But probably a missing Q_OBJECT macro.

lorik
13th September 2011, 11:40
thanks for your reply

The link error is:
Error 1 error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWinHost::staticMetaObject" (?staticMetaObject@QWinHost@@2UQMetaObject@@B) main.obj

the running example is attached.

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?

high_flyer
13th September 2011, 13:02
did you call qmake?
Is main.moc being created?

lorik
14th September 2011, 09:06
Yes ,
Please look at the window attached

high_flyer
14th September 2011, 09:11
The image is too small to see anything.

lorik
14th September 2011, 09:15
Please try this one

high_flyer
14th September 2011, 09:39
This doesn't mean main.moc is actually there, if you click it, does it open?

lorik
14th September 2011, 13:27
Yes, it opens

high_flyer
14th September 2011, 13:38
From the information you posted it should work... there is probably something else wrong...

nthung
28th September 2011, 08:15
I am learning about that:
but when I complie it into .lib file the errors is raised 6915
I want to ask you that, Can qtwinmigrate convert everything from MFC to Qt?
thanks