如何在QT for S60 中使用pthread库(Carbide.c++) (How to use pthread in QT4.6 for S60)

1. 按照下面的文章 先设置好环境

2. 修改.pro 文件,加上下面一行 LIBS += -llibpthread -llibz

3. 增加系统路径的目录,修改.pro 文件,加上下面一行 INCLUDEPATH = C:/Symbian/Carbide/workspace/PhoenixPhoneForS60/include 

4. 指定宏,修改.pro 文件,加上下面一行 MACRO = OSIP_MT

 

 

 

附件 :

QT + Open C/C++ 开发环境的搭建

 

http://wiki.forum.nokia.com/index.php/Qt_Tutorial_Lesson_1:_Installation

 

 

Qt Tutorial Lesson 1: Installation

 

Contents

  [hide]

Wiki Article Overview

This Wiki article will provide you Qt for Symbian installation in full steps.

Image:QtLogo.png

 

Install Carbide C++ and Series 60 SDK

Make sure you have Symbian development environment (Carbide C++ 2.0Series 60 SDK 3rd FP1 or Series 60 SDK 3rd FP2 or Series 60 SDK 5th Edition and Active Perl) installed on your computer. If you still don't have them yet, please do following these steps.

Active Perl Installation

- Download Active Perl from http://www.activestate.com/activeperl/

- install it to C:/Perl or any directory that doesn't contain space character

Carbide C++ Installation

- Download Carbide C++ 2.0 from http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html

- install it to C:/ (in case if you installed Perl in different drive, you have to install Carbide C++ to the same drive as Perl)

Series 60 SDK Installation

- Download Series 60 3rd SDK FP1 or Series 60 3rd SDK FP2 or Series 60 5th SDK 1.0 fromhttp://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Platforms/S60_Platform_SDKs/ (I suggest you to download S60 3rd SDK FP2 for button-based application and S60 5th SDK 1.0 for touch-based application)

- install it to the same drive as Perl and Carbide C++

Test your Installation

Now it's time to test that your Symbian Development Environment work or not.

- Open Carbide C++ 2.0 from Start Menu and define workspace directory. Please make sure that there is no space contain in workspace directory or your code will can't be compiled.

- on the menu bar, choose File -> New -> Symbian OS C++ Project

Image:CarbideNewProject 1.png

- Select GUI Application under S60 and press Next

Image:CarbideNewProject 2.png

- Define Project Name (HelloWorld for newbie) and press Next

Image:CarbideNewProject 3.png

- Check at Emulator Debug (WINSCW) and Phone Release (GCCE) under desired SDK (S60 3rd FP2 or/and S60 5th SDK) and press Next

Image:CarbideNewProject 4.png

- Define Application UID and press Finish (in case you don't know what it is, you can use the generated UID, so just press Finish)

Image:CarbideNewProject 5.png

- Now there will be a project named HelloWorld at the left pane. Right mouse click at project name and change Active Build Configuration to Emulator Debug (WINSCW)

Image:CarbideNewProject 6.png

- Press Run icon on tool bar

Image:CarbideNewProject 7 2.png

New Launch Configuration Wizard will appear. Select Emulator in Process to launch and then press Finish

Image:CarbideNewProject 8.png

- Carbide C++ will compile the code for you. After finish, Emulator will be launched automatically.

Image:CarbideNewProject 9.png

- Now go into Menu -> Installations. There should be HelloWorld icon

Image:CarbideNewProject 10.jpg

- Now launch it

Image:CarbideNewProject 11.png

- Hello Worlddddd ;)

 

Install Open C/C++ Plugin and Qt for Symbian

Install Open C/C++ Plugin

Open C Plugin is required by Qt for Symbian. To install it:

- Download latest version of Open C/C++ Plug-in from http://www.forum.nokia.com/info/sw.nokia.com/id/91d89929-fb8c-4d66-bea0-227e42df9053/Open_C_SDK_Plug-In.html

- Install it to desired SDK (In case you need to install the plug-in to multiple SDK, you have to do the installation one by one)

Image:OpenCPluginInstallation.png

 

Install Qt for Symbian SDK

- Download latest version of Qt for Symbian Windows installer from http://qt.nokia.com/downloads (Download LGPL version)

- Install it to same drive as Series 60 SDK (Make sure that your selected directory does not contain any space character)

Image:QtS60Installation 1.png

- In installation process, you will be requested to choose the SDK(s) to install Qt, please select all SDK(s) you want.

Image:QtS60Installation 2.png

- And then Next Next and Next

Image:QtS60Installation 3.png

- Finish!!

 

Setup Qt on Carbide C++

Now you have to setup Carbide C++ to know Qt path. To do that, please do the following step:

- Open Carbide C++ 2.0

- On the menu bar, choose Window -> Preferences

- Select Qt on the left pane and then press Add

- Enter Version Name and Browse for Qt Bin Path and then click Finish

Image:QtS60Installation 4.png

 

Testing

To test it:

- On the menu bar, choose File -> New -> Qt Project

Image:NewQtProject.png

- Choose Qt GUI Main Window

Image:NewQtProject 1.png

- Define Project Name

Image:NewQtProject 2.png

- Select Target SDK

Image:NewQtProject 3.png

Image:NewQtProject 4.png

- Define Application UID (in case you don't know just press Finish)

Image:NewQtProject 5.png

- Now, there will be HelloWorldQt project appear in the left pane.

Image:NewQtProject 6.png

- Run with Emulator launch configuration.

Image:CarbideNewProject 7 2.png

Image:CarbideNewProject 8.png

HelloWorldQt icon should be in Menu -> Installations folder in Emulator

Image:NewQtProject 7.jpg

- Launch it!

Image:NewQtProject 8.jpg

- Bingo!! Hello CUTEEEEEEEEE ^_^

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值