Qt for Symbian 入门之环境搭建

Qt for the Symbian platform Requirements

Qt for the Symbian platform requires the following software installed on your development PC:

  • Carbide.c++ v2.0.0 or higher
    • Note: It may be necessary to update the Carbide compiler. See here for instructions how to check your compiler version and how to patch it, if needed.
  • ActivePerl v5.6.1 build 638
    • Note: According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors.
  • S60 Platform SDK 3rd Edition FP1 or higher
    • Note: Users of S60 Platform SDK 3rd Edition FP1 also need special update. The update can be found here .
  • Open C/C++ v1.6.0 or higher . Install this to all Symbian SDKs you plan to use Qt with.
  • Building Qt tools from scratch requires MinGW 3.4.5 or higher , or another windows compiler.
    • Note: This is not required if you are using pre-built binary package.
  • Building Qt libraries requires RVCT 2.2 [build 686] or later, which is not available free of charge.

Running Qt on real device requires the Open C to be installed on the device. The Open C installation packages are embedded into qt_installer.sis , which is included in Qt for Symbian binary package. If you are building Qt from scratch, you can find the required packages in the Symbian SDK where you installed Open C/C++:

  • nokia_plugin/openc/s60opencsis/pips_s60_<version>.sis
  • nokia_plugin/openc/s60opencsis/openc_ssl_s60_<version>.sis
  • nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_<version>.sis

If you wish to do hardware debugging with Carbide or run applications in real devices using "make run" command, TRK must be installed to the device. Note: TRK is not required if you just want to install and run applications manually on the device.

       Application TRK . Choose the correct installation package based on the S60 version of your device (S60_<S60-version>_app_trk_<TRK-version>.sisx).

网址:http://doc.trolltech.com/4.6-snapshot/requirements-symbian.html

 

Frequently Asked Questions (FAQ) for Qt for Symbian

Q: Do you support Carbide.c++ v1.2?

A: No. Recommended Carbide version to use is 2.0.2 and up.

Q: Which SDKs are supported?

A: Qt has been tested with the S60 3.1, 3.2, 5.0 and N97 SDK.

Q: What tools do I need to develop an application with Qt for Symbian?

A: See http://doc.trolltech.com/4.6-snapshot/requirements-symbian.html

Q: What platforms does Qt for Symbian support?

A: See README.symbian file.

Q: Which Qt modules are currently working on Symbian?

A: See README.symbian file.

Q: Which new Qt modules are coming in the next release?

A: TBA

Q: When is the next release?

A: TBA

Q: Which parts are currently left out of QtCore?

A: QtConcurrent not ported, QProcess doesn’t support streams, and QSettings not using Symbian specific storages i.e. Central Repository

Q: Which parts are currently left out of QtGui

A: Printing and accessibility.

Q: Which parts are currently left out of QtNetwork?

A: No support for IPv6 and no support for multicast.

Q: What input methods are supported in the current release?

A: Multitap and predictive text in any language, as well as virtual keyboard on touch based devices.

Q: Which devices has Colossus release been tested on?

A: N78, N79, N95, N96, N97, 5800 XpressMusic and 6290

Q: I'm getting an error when trying to run example.exe, can you help me ?

A: Before sending email to feedback list please check that you have set your enviroment variables correctly and that you have patched your environment according to installation notes.

Make sure you have patched your x86 compiler by typing in command prompt:
mwccsym2.exe -version
Expected output is:
Version 3.2.5 build 482 (Build 482)

The build number should be 482 or later.

Q: I give up. I need help from the mailing list. What should I include?

A: When sending email to feedback list please include the following information in your post:

  1. Executable that you are trying to run.
  2. Environment that you are working with e.g. S60 5.0 v.1.0
  3. Call stack of the error occuring, see section the question about how to obtain call stack from carbide.

Q: How do I get call stack from Carbide 2.0?

A: First you need to import your project to carbide in order to debug it. Select file->import->Symbian OS->Symbian OS bld.inf file If you can’t find bld.inf under your project directory you first need to run bldmake bldfiles from command prompt. In order to catch all errors occuring you need to check all but c++ exceptions under x86 exceptions tab in debug configurations. When running debug Carbide will stop at the point of error occuring. From Debug View select the call stack under thread saying suspended and copy (ctrl+c) it and paste it to the email you are about to send.

Q: How do I load my plugin? I tried loading it from /sys/bin but it fails.

A: In Qt for Symbian we had to implement plugin stubs to get around the need for AllFiles capability to access /sys/bin and some other issues. Plugin stubs are files with the same base name as the actual plugin dll but with a “.qtplugin” suffix. They need to be in some accessible location. For private plugins this is typically the application’s private dir, but for public plugins it can be anywhere; e.g. Qt extension plugins have default public base dir “/resource/qt/plugins” (which can be queried with QLibraryInfo::location(QLibraryInfo::PluginsPath, if needed at compile time, or via the $$QT_PLUGINS_BASE_DIR variable defined in the data_caging_paths.prf feature file, if needed in the .pro file). If either the stub or the actual plugin.dll are missing, the plugin loading will fail. The stub contents are mostly irrelevant. Only the file name and timestamp matter (the stub timestamp is checked in plugin caching). If the DEPLOYMENT variable is used properly, the stub gets generated and deployed automatically and you don’t need to worry about it. See http://doc.trolltech.com/4.6-snapshot/qmake-variable-reference.html#deployment for details.

When loading plugins with QPluginLoader, do not give the plugin dll itself as a target, use the stub file instead, although for convenience you can use either “.dll” or “.qtplugin” as the suffix. E.g. if you have the plugin stub named as “c:/foo/bar.qtplugin”, and the actual plugin as is located at “c:/sys/bin/bar.dll”, you can use either QPluginLoader(“c:/foo/bar.dll”) or QPluginLoader(“c:/foo/bar.qtplugin”) to load the plugin. So basically you can treat the stub as you would the actual plugin on other platforms.

Q: Qt applications get an additional white window with a black cursor. How can I fix this?

A: This is a result of having the ‘stdioserver’ package installed. This application is a server process that redirects STDIN and STDOUT to a console window by default. This behavior can be be changed by modifying the configure file located at “C:/system/data/config.ini”. The relevant change involves editing the [STDIO] section and changing STDIN and STDOUT to be:

     STDIN = MEDIA1
STDOUT = MEDIA4

MEDIA1 and MEDIA4 should be of the type ‘file’ and should have a path pointing to “in.txt” or “out.txt” respectively and located in the same directory as “config.ini”. You must also ensure that the “in.txt” file actually exists when making the above change. The above change will work both in the emulator as well as in hardware where the path inside the SDK is $EPOCROOT/winscw/c/system/data.

Q: Installing Qt on N78 with firmware PR 1.0 fails. How can I work around it?

A: Please upgrade device’s firmware to a newer release.

Q: When installing “qt_installer.sis” or “qt_demos.sis” it fails with error “-16”. How can I work around it?

A: Try installing it again. If that fails, try installing the Open C packages + “qt.sis” + “qtwebkit.sis” one by one.

网址:http://qt.gitorious.org/qt/pages/SymbianFAQ

 

以上资料在我没有安装Qt之前没有找到,复制出来,给用得着的人,也给以后自己备份。

手机上的需求

如果需要Nokia S60系列手机上运行Qt程序,那么需要先有Qt的运行库,因为商店卖给你手机的时候并没有安装Qt库(也许以后的版本会装上,但是谁知道以后有多后 呢),所以需要你自己去安装。当然Qt库还会依赖于其它几个C和C++的库,分别是pips/openc_ssl/stdcpp。如果是4.5.2,基础 库下载地址可以是 pips_s60_1_5_5b.sis openc_ssl_s60_1_5_5b.sis stdcpp_s60_1_5_5b.sis 。Qt库和演示程序的下载则在 http://pepper.troll.no/s60prereleases/demos/ 目录下。安装完后就可以在你的手机上体验Qt应用了。
如果想测试你自己编写的Qt-4.6.0-beta程序,则需要Qt-4.6.0以上的库文件,我在安装自己应用的时候提示要Qt 4.0.6以上版本,不会是bug吧,呵呵。上上下下翻了几遍http://pepper.troll.no/s60prereleases里的文章,也 没找到下载Qt-4.6.0-beta库的地方。只好自己动手丰衣足食。如果你已经安装了Qt for Symbian 4.6.0-beta的SDK后,那么在安装目录下C:Qt4.6.0-beta可以看到两个.sis文件fluidlauncher.sis和 qt.sis,你需要安装它们。同样Qt的依赖库也可以在安装目录下找到,地址分别为
<EPOCROOT>nokia_plugin/openc/s60opencsis/pips_s60_<version>.sis
<EPOCROOT>nokia_plugin/openc/s60opencsis/openc_ssl_s60_<version>.sis
<EPOCROOT>nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_<version>.sis


 

注意事项总结:

1 如果发现没有那几个在手机上安装的包,或者编译不能通过,比如我是在S60 3th 的时候就没有,就是要安装Open c++。最新下载

2 Carbide需要安装更高的版本。最新下载

3 将qt的bin路径(c:/qts60/bin)加到系统的PATH里。

4 在Carbide中添加Qt路径:Window->Preference->Qt

 

参考:

在S60上安装Qt

Qt for S60使用入门

 


 

 

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值