Windows上无法建立适用于Android的Qt 5.2.1 [英] Qt 5.2.1 for Android on Windows not building

查看:134
本文介绍了Windows上无法建立适用于Android的Qt 5.2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用为CPU armeabi-v7a编译的Qt构建Android的HelloWord应用程序.

I'm trying to build a HelloWord application for Android with Qt compiled for cpu armeabi-v7a.

在第一次尝试构建时,出现此错误:

On the first building attempt I get this error:

C:\Android\android-ndk\sources\cxx-stl\gnu-libstdc++\4.8\include\bits\move.h:33: error: bits/c++config.h: No such file or directory

所以我将以下内容添加到我的专业文件中:

so I add in my pro file this:

#INCLUDEPATH +=C:/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include \

第二次尝试时出现此错误:

On the second attempt I get this error:

C:\Android\android-ndk\sources\cxx-stl\gnu-libstdc++\4.8\include\bits\stl_relops.h:67: error: 
expected '{' before '_GLIBCXX_VISIBILITY' namespace std _GLIBCXX_VISIBILITY(default)
C:\Android\android-ndk\sources\cxx-stl\gnu-libstdc++\4.8\include\bits\stl_relops.h:67: error:
expected constructor, destructor, or type conversion before '(' token namespace std _GLIBCXX_VISIBILITY(default)

现在我不知道如何解决这个问题.

And now I don't know how resolve this problem.

有人可以帮助我吗?

谢谢你, Mattia

Thank you, Mattia

推荐答案

  1. 您自己编译Qt吗?如果不是,则必须确保您的应用程序使用与编译Qt相同的编译器.

  1. Did you compile Qt yourself? If not, you must ensure that you're using the same compiler for your application as was used to compile Qt.

您无需在基于Qt的项目中添加任何其他包含项.这些由构建系统(qmake和mkspecs)处理.

You shouldn't need to add any extra includes to your Qt-based project. Those are handled by the build system (qmake and the mkspecs).

到目前为止,您似乎正在运行预构建的Qt,而用于构建自己的应用程序的编译器与Qt期望的不符.

So far it looks as if you're running pre-built Qt, and the compiler you're using to build your own application doesn't match what Qt expects.

这篇关于Windows上无法建立适用于Android的Qt 5.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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