Trolltech Home | Qt-solutions Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-solutions Archive, August 2006
Qt/MFC Migration - installation/integration problems


Message 1 in thread

Hi!
 
I'm porting code to qt 4.1.0, so I've upgraded qtwinmigrate from 1.3 to
2.4.
 
In 1.3, there was no problem with installation and integration. I ran
qmake in your-install-dir, moved to src subdirectory and ran nmake.
qtwinmigrate.lib was built in $(QTDIR)/lib, I linked against this lib
and everything was ok.
 
Now 2.4 is a whole different story. There's no make file in src
subdirectory now, so I ran nmake in your-install-dir, which built some
examples and moved qtdialog.dll to $(QTDIR)/bin. First I linked against
qtdialog.lib and got unresolved symbols
 
EFormsViewerEBank.obj : error LNK2001: unresolved external symbol
"public: static struct QMetaObject const QWinWidget::staticMetaObject"
(?staticMetaObject@QWinWidget@@2UQMetaObject@@B)
ScreenView.lib(ViewWindow.obj) : error LNK2001: unresolved external
symbol "public: static struct QMetaObject const
QWinWidget::staticMetaObject"
(?staticMetaObject@QWinWidget@@2UQMetaObject@@B)
Debug/EFormsViewerEBank.dll : fatal error LNK1120: 1 unresolved
externals
 
I remedied this by linking
your-install-dir/examples/winwidget/debug/moc_qwinwidget.obj, but now my
application is dependent on winwidget.exe ??! Another issue is that I
sometimes get annoying error message when linking:
 
moc_qwinwidget.obj : fatal error LNK1202:
"M:\EFViewer_4.0_dev\e-forms\viewer\CORE\RUNNERS\EFormsViewerEBank\Debug
\vc60.pdb" is missing debugging information for referencing modul
 
Now my app seems to be working, but winwidget.exe dependency is
unacceptable and LNK1202 error is inconvenient. What am I doing wrong?
It's strange I'm the only one having this problems (based on my google
searches) since qtwinmigrate.lib is conspicuous by absence.
 
Thanks!
 
Bojan

Message 2 in thread

Qt Solutions don't usually compile into a static library; instead, you 
include the .pri file from the respective src directory in your .pro file.

That QtWinMigrate 1.x compiled into a static library was quite 
inconsistent, esp. with the documentation for Qt Solutions.


Volker

PS: The qtdialog.dll is part of an example, and doesn't export any 
symbols. It's a plugin, loaded at runtime - you don't link against it.


"Bojan Dolinar" <bojan.dolinar@xxxxxxxxx> wrote in message 
news:eanbjq$ui4$1@xxxxxxxxxxxxxxxxxxxxx
> Hi!
>
> I'm porting code to qt 4.1.0, so I've upgraded qtwinmigrate from 1.3 to
> 2.4.
>
> In 1.3, there was no problem with installation and integration. I ran
> qmake in your-install-dir, moved to src subdirectory and ran nmake.
> qtwinmigrate.lib was built in $(QTDIR)/lib, I linked against this lib
> and everything was ok.
>
> Now 2.4 is a whole different story. There's no make file in src
> subdirectory now, so I ran nmake in your-install-dir, which built some
> examples and moved qtdialog.dll to $(QTDIR)/bin. First I linked against
> qtdialog.lib and got unresolved symbols
>
> EFormsViewerEBank.obj : error LNK2001: unresolved external symbol
> "public: static struct QMetaObject const QWinWidget::staticMetaObject"
> (?staticMetaObject@QWinWidget@@2UQMetaObject@@B)
> ScreenView.lib(ViewWindow.obj) : error LNK2001: unresolved external
> symbol "public: static struct QMetaObject const
> QWinWidget::staticMetaObject"
> (?staticMetaObject@QWinWidget@@2UQMetaObject@@B)
> Debug/EFormsViewerEBank.dll : fatal error LNK1120: 1 unresolved
> externals
>
> I remedied this by linking
> your-install-dir/examples/winwidget/debug/moc_qwinwidget.obj, but now my
> application is dependent on winwidget.exe ??! Another issue is that I
> sometimes get annoying error message when linking:
>
> moc_qwinwidget.obj : fatal error LNK1202:
> "M:\EFViewer_4.0_dev\e-forms\viewer\CORE\RUNNERS\EFormsViewerEBank\Debug
> \vc60.pdb" is missing debugging information for referencing modul
>
> Now my app seems to be working, but winwidget.exe dependency is
> unacceptable and LNK1202 error is inconvenient. What am I doing wrong?
> It's strange I'm the only one having this problems (based on my google
> searches) since qtwinmigrate.lib is conspicuous by absence.
>
> Thanks!
>
> Bojan
> 


--
 [ signature omitted ]