编译Qt库以与Visual Studio 2008一起运行时,nmake为什么会失败? [英] Compiling Qt libraries to run with Visual Studio 2008, why does nmake fail?

查看:153
本文介绍了编译Qt库以与Visual Studio 2008一起运行时,nmake为什么会失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使我的Visual Studio Qt插件正常工作,因此为了重新编译Qt库,我从VS命令提示符处运行了以下命令:

I'm trying to get my Visual Studio Qt plug-in to work, so to recompile the Qt libraries i ran the following commands from a VS command prompt:

c:\*Qtfolder*>configure -platform -win32-msvc2008

此后,我运行了nmake并开始了编译过程.经过大约45分钟后,由于链接错误而中止.我总共从QNetworkReplyHandler.obj和FrameLoaderClientQt.obj中收到八个无法解析的外部符号"错误.这些都不是我需要的库,但是由于它们的错误,编译中止了.当它终止时,其余的库似乎都快完成了,实际上,我现在甚至可以在Visual Studio中加载和编译我的Qt项目,它们只是麻烦的小车,因为很可能不是所有的库都在编译.有没有人碰到这个或者也许知道为什么nmake失败了?

After this I ran nmake and started the compilation process. It went for about 45 minutes before aborting due to linking errors. I got a total of eight "unresolved external symbol" errors, all from QNetworkReplyHandler.obj and FrameLoaderClientQt.obj. Neither of these are libraries that I need, but the compilation is being aborted due to their errors. When it does abort the rest of the libraries seem to be almost done, in fact I can even load and compile my Qt projects in Visual Studio at this point, they just runny buggy due most likely to not all of the libraries being compiled. Has anyone run into this or maybe know why nmake is failing?

似乎我可以告诉编译器尽管出错但仍继续运行,或者省略有问题的库,它可能会起作用. Qt的configure有很多选项,但是我找不到能满足我需求的任何东西,不幸的是,我找不到Qt的configure选项的在线参考,Google搜索提供的所有内容都是"Qtopia"的原因.

It seems like if I could either tell the compiler to keep going in spite of the errors or to omit the offending libraries it might work. Qt's configure has a lot of options but I can't find any that do what I need, and unfortunately I can't find an online reference of Qt's configure options, everything that comes up with a google search is for "Qtopia" for some reason.

这是最后一个错误.还有七个基本上完全相同的错误,只是针对不同的符号

Here is the last error. There are seven more that are basically exactly the same error, just for different symbols

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: 8 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.

推荐答案

显然,您可以通过删除src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared中的mocinclude.tmp的两个实例来解决此特定错误. (来源).

Apparently you can get around this particular error by deleting the two instances of mocinclude.tmp in src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared. (Source).

顺便说一句,在运行configure时,您可以向其传递一个'help'参数,以获取其能够理解的参数列表(即configure help).

As an aside, when you run configure you can pass a 'help' argument to it to get a list of arguments it understands (i.e. configure help).

这篇关于编译Qt库以与Visual Studio 2008一起运行时,nmake为什么会失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆