[Qt-interest] Unresolved Externals when building in release mode.

Wm. G. Urquhart wgu at wurquhart.co.uk
Fri Jun 4 16:44:46 CEST 2010


Hi,

When trying to build a release version of my application I get the 
following at link time?

1>matrix.obj : error LNK2001: unresolved external symbol "public: static 
struct QListData::Data QListData::shared_null" 
(?shared_null at QListData@@2UData at 1@A)
1>matrix.obj : error LNK2001: unresolved external symbol "private: 
static struct QString::Data QString::shared_null" 
(?shared_null at QString@@0UData at 1@A)
1>solver.obj : error LNK2001: unresolved external symbol "private: 
static struct QString::Data QString::shared_null" 
(?shared_null at QString@@0UData at 1@A)
1>moc_matrix.obj : error LNK2001: unresolved external symbol "public: 
static struct QMetaObject const QMainWindow::staticMetaObject" 
(?staticMetaObject at QMainWindow@@2UQMetaObject@@B)
1>moc_solver.obj : error LNK2001: unresolved external symbol "public: 
static struct QMetaObject const QDialog::staticMetaObject" 
(?staticMetaObject at QDialog@@2UQMetaObject@@B)
1>moc_worker.obj : error LNK2001: unresolved external symbol "public: 
static struct QMetaObject const QObject::staticMetaObject" 
(?staticMetaObject at QObject@@2UQMetaObject@@B)
1>qtmain.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol 
"public: static class QString __cdecl QString::fromWCharArray(wchar_t 
const *,int)" (?fromWCharArray at QString@@SA?AV1 at PEB_WH@Z)

What I have noticed is that these files are passed through the MOC 
compiler. I'm using VS2008 on Vista x64, Qt 4.6.0 and the Intel Compiler 
v11.54.

-- 
William



More information about the Qt-interest-old mailing list