[Qt-interest] error LNK2001: unresolved external symbol "public: static struct QMetaObject const

Santhosh Y santhosh at softjin.com
Sun Dec 13 06:01:32 CET 2009


Hi,

Following is the link error I am facing. Can anybody suggest what could 
be the problem here.
I am able to find  "staticMetaObject at MyWidget@@2UQMetaObject@@B" when I 
search in my lib (nm -s WIDGET.lib)

====================================================================================================
Generating Code...
        link /LIBPATH:"c:\Qt\4.5.2\lib" /NOLOGO /DEBUG 
/SUBSYSTEM:CONSOLE /MANIFEST /MANIFESTFILE:"debug\Driver.intermediate
.manifest" /OUT:bin_dbg\Driver.exe 
@C:\DOCUME~1\SANTHO~1.SOF\LOCALS~1\Temp\nm1934.tmp
   Creating library bin_dbg\Driver.lib and object bin_dbg\Driver.exp
driver.obj : error LNK2001: unresolved external symbol "public: static 
struct QMetaObject const MyWidget::staticMetaObject"
(?staticMetaObject at MyWidget@@2UQMetaObject@@B)
mydialog.obj : error LNK2001: unresolved external symbol "public: static 
struct QMetaObject const MyWidget::staticMetaObject
" (?staticMetaObject at MyWidget@@2UQMetaObject@@B)
moc_mydialog.obj : error LNK2001: unresolved external symbol "public: 
static struct QMetaObject const MyWidget::staticMetaOb
ject" (?staticMetaObject at MyWidget@@2UQMetaObject@@B)
bin_dbg\Driver.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 
9.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 
9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

D:\IssueWithDLL\driver>

-- 
----------------------------------------------------
Y Santhosh Kumar - 
Senior Software Engineer,
SoftJin Technologies Pvt Ltd,
www.softjin.com
----------------------------------------------------



Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________





More information about the Qt-interest-old mailing list