PDA

View Full Version : "Warnings" with NMake and MSVC2008



vbman213
13th February 2010, 18:59
Is it normal to see a few "Warnings" when building Qt with MSVC2008?

Do "warnings" mean that that particular piece of Qt failed to build? Or can I ignore them?


"Unreferenced Formal Parameter"

Lykurg
13th February 2010, 20:28
You can ignore them. They occur because of something like that:
void MyClass::someFunction(int parameter, bool isItTrue)
{
// I do fancy stuff here, but I don't use parameter or isItTrue
}because you don't use the parameters the compiler isforms you. To avoid the Warning you can use:
void MyClass::someFunction(int parameter, bool isItTrue)
{
Q_UNUSED(parameter)
Q_UNUSED(isItTrue)
// I do fancy stuff here
}or
void MyClass::someFunction(int /*parameter*/, bool /*isItTrue*/)
{
// I do fancy stuff here
}

vbman213
13th February 2010, 21:33
This isn't normal:


Creating library ..\..\..\..\lib\QtWebKitd4.lib and object ..\..\..\..\lib\Qt
WebKitd4.exp
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual struct QMetaObject const * __thiscall WebCore::FormDataIODevice::metaObjec
t(void)const " (?metaObject@FormDataIODevice@WebCore@@UBEPBUQMeta Object@@XZ)
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual void * __thiscall WebCore::FormDataIODevice::qt_metacast(char const *)" (?
qt_metacast@FormDataIODevice@WebCore@@UAEPAXPBD@Z)
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual int __thiscall WebCore::FormDataIODevice::qt_metacall(enum QMetaObject::Ca
ll,int,void * *)" (?qt_metacall@FormDataIODevice@WebCore@@UAEHW4Call @QMetaObject
@@HPAPAX@Z)
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual struct QMetaObject const * __thiscall WebCore::QNetworkReplyHandler::metaO
bject(void)const " (?metaObject@QNetworkReplyHandler@WebCore@@UBEPBUQ MetaObject@
@XZ)
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual void * __thiscall WebCore::QNetworkReplyHandler::qt_metacast(char const *)
" (?qt_metacast@QNetworkReplyHandler@WebCore@@UAEPAX PBD@Z)
QNetworkReplyHandler.obj : error LNK2001: unresolved external symbol "public: vi
rtual int __thiscall WebCore::QNetworkReplyHandler::qt_metacall(enum QMetaObject
::Call,int,void * *)" (?qt_metacall@QNetworkReplyHandler@WebCore@@UAEHW4 Call@QMe
taObject@@HPAPAX@Z)
QNetworkReplyHandler.obj : error LNK2019: unresolved external symbol "protected:
void __thiscall WebCore::QNetworkReplyHandler::processQueuedItems( void)" (?proc
essQueuedItems@QNetworkReplyHandler@WebCore@@IAEXX Z) referenced in function "pub
lic: void __thiscall WebCore::QNetworkReplyHandler::setLoadMode(enum WebCore::QN
etworkReplyHandler::LoadMode)" (?setLoadMode@QNetworkReplyHandler@WebCore@@QAEXW
4LoadMode@12@@Z)
FrameLoaderClientQt.obj : error LNK2019: unresolved external symbol "protected:
void __thiscall QWebPage::unsupportedContent(class QNetworkReply *)" (?unsupport
edContent@QWebPage@@IAEXPAVQNetworkReply@@@Z) referenced in function "public: vi
rtual void __thiscall WebCore::FrameLoaderClientQt::download(class WebCore::Reso
urceHandle *,struct WebCore::ResourceRequest const &,struct WebCore::ResourceReq
uest const &,class WebCore::ResourceResponse const &)" (?download@FrameLoaderCli
entQt@WebCore@@UAEXPAVResourceHandle@2@ABUResource Request@2@1ABVResourceResponse
@2@@Z)
FrameLoaderClientQt.obj : error LNK2019: unresolved external symbol "protected:
void __thiscall QWebPage::downloadRequested(class QNetworkRequest const &)" (?do
wnloadRequested@QWebPage@@IAEXABVQNetworkRequest@@ @Z) referenced in function "pu
blic: virtual void __thiscall WebCore::FrameLoaderClientQt::startDownload(struct
WebCore::ResourceRequest const &)" (?startDownload@FrameLoaderClientQt@WebCore@
@UAEXABUResourceRequest@2@@Z)
..\..\..\..\lib\QtWebKitd4.dll : fatal error LNK1120: 9 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.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

Lykurg
13th February 2010, 21:57
Hey,

sorry I haven't read your post carefully. I thought you are building your own project.
As for your last posted error there are some notes that intel has problems to build Qt: http://doc.trolltech.com/4.6/known-issues.html. One solution could be to turn off inlining for the compiler. But on that topic I am out...

Lykurg

vbman213
13th February 2010, 22:01
I'm not using the Intel Compiler... I'm using MSVC2008

Lykurg
13th February 2010, 22:22
I'm not using the Intel Compiler... I'm using MSVC2008
Wow, today is definitely not my day! But I found an article that says your have to remove

src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp

and

src/script/tmp/moc/{debug,release}_shared/mocinclude.tmp

and rerun nmake. The guy had the same error like you and for him it works. You can give it a try.

vbman213
14th February 2010, 00:44
I'm trying again...

I also configured:

"configure -nomake demos -nomake examples"

and ran nmake sub-src

I think that will speed up the build time as it is ignoring the examples and demos