主题 : linux2.6.29+qtopia2.2.0 如何实现多线程编程呢? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 6261
精华: 0
发帖: 13
金钱: 130 两
威望: 130 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-05-25
最后登录: 2010-07-27
楼主  发表于: 2009-06-29 15:37

 linux2.6.29+qtopia2.2.0 如何实现多线程编程呢?

管理提醒: 本帖被 arm9home 从 Linux技术交流专区 移动到本区(2009-09-10)
最近在做qt开发,需要用到多线程编程,不知道目前友善之臂提供的linux2.6.29+qtopia2.2.0能不能实现多线程编程?如何实现?
有做过的大侠指教!!!急
Linux@ARM
级别: 新手上路
UID: 2478
精华: 0
发帖: 48
金钱: 410 两
威望: 354 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2008-11-19
最后登录: 2018-02-08
1楼  发表于: 2009-06-30 10:17
这个还不清楚啊!
关键是看配置那个-lqt-mt没有?
欢迎访问Linux@ARM博客:
http://l0p0c.cublog.cn
Linux@ARM
级别: 新手上路
UID: 2478
精华: 0
发帖: 48
金钱: 410 两
威望: 354 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2008-11-19
最后登录: 2018-02-08
2楼  发表于: 2009-06-30 10:18
请专家来给解答下
欢迎访问Linux@ARM博客:
http://l0p0c.cublog.cn
级别: 新手上路
UID: 6261
精华: 0
发帖: 13
金钱: 130 两
威望: 130 点
贡献值: 0 点
综合积分: 26 分
注册时间: 2009-05-25
最后登录: 2010-07-27
3楼  发表于: 2009-06-30 10:29
咨询了友善之臂的技术人员,说是qtopia本身就没有多线程库。。。。怎么办呢?
Linux@ARM
级别: 新手上路
UID: 2478
精华: 0
发帖: 48
金钱: 410 两
威望: 354 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2008-11-19
最后登录: 2018-02-08
4楼  发表于: 2009-06-30 11:16
不会吧……
欢迎访问Linux@ARM博客:
http://l0p0c.cublog.cn
会当凌绝顶,一览众山小!
级别: 总版主
UID: 2
精华: 17
发帖: 1655
金钱: 13860 两
威望: 5369 点
贡献值: 17 点
综合积分: 3650 分
注册时间: 2008-01-01
最后登录: 2024-02-17
5楼  发表于: 2009-06-30 11:57
引用第3楼rainy0415于2009-06-30 10:29发表的  :
咨询了友善之臂的技术人员,说是qtopia本身就没有多线程库。。。。怎么办呢?

估计搞错了吧
友善之臂淘宝直销店:http://shop34928758.taobao.com

手机:13560352861(杨工),QQ:10108270
Linux@ARM
级别: 新手上路
UID: 2478
精华: 0
发帖: 48
金钱: 410 两
威望: 354 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2008-11-19
最后登录: 2018-02-08
6楼  发表于: 2009-06-30 13:41
我可以肯定,qtopia是支持多线程的。就看配置成什么样子了!
欢迎访问Linux@ARM博客:
http://l0p0c.cublog.cn
这个阶段正是我事业的上升期,我怎么能走得开呢?
级别: 精灵王
UID: 3197
精华: 3
发帖: 770
金钱: 6995 两
威望: 5398 点
贡献值: 21 点
综合积分: 1600 分
注册时间: 2008-12-30
最后登录: 2010-12-31
7楼  发表于: 2009-06-30 14:10
引用第6楼l0p0c于2009-06-30 13:41发表的  :
我可以肯定,qtopia是支持多线程的。就看配置成什么样子了!


作为初学者,你有什么理由这么肯定?你研究过代码吗还是道听途说?还是踏实点认真看下吧
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-06-30 17:05
引用第6楼l0p0c于2009-06-30 13:41发表的  :
我可以肯定,qtopia是支持多线程的。就看配置成什么样子了!

如果你说的多线程指的是libqte-mt.so的话,qtopia-2.2.0是支持的,但前提是你需要重新编译其中的qte以生成libqte-mt.so, 这可以通过在qte的配置上加上'-thread'参数做到。
这是在qtopia-2.2.0-FriendlyARM/qt2目录下./configure -help的输出

Usage: ./configure [-debug] [-release] [-shared] [-static] [-gif] [-no-gif] \
          [-sm] [-no-sm] [-thread] [-no-thread] [-qt-zlib] [-system-zlib] \
          [-qt-libpng] [-system-libpng] [-no-jpeg] [-system-jpeg] \
          [-no-<module>] [-kde] [-Istring] [-Lstring] [-Rstring] [-lstring]

The defaults (*) are usually acceptable.  Here is a short explanation of
each option:

*  -release ........... Compile and link Qt with debugging turned off.
    -debug ............. Compile and link Qt with debugging turned on.

*  -shared ............ Create and use a shared Qt library (libqt.so)
    -static ............ Create and use a static Qt library (libqt.a)

*  -no-gif ............ Do not compile in GIF reading support.
    -gif ............... Compile in GIF reading support. See src/kernel/qgif.h

    -no-sm ............. Do not support X Session Management.
*  -sm ................ Support X Session Management, links in -lSM -lICE.

*  -no-thread ......... Do not compile with Threading Support
    -thread ............ Compile with Threading Support


*  -qt-zlib ........... Use the zlib bundled with Qt.
    -system-zlib ....... Use a zlib from the operating system
                         http://www.info-zip.org/pub/infozip/zlib

*  -qt-libpng ......... Use the libpng bundled with Qt.
    -system-libpng ..... Use a libpng from the operating system.
                         See http://www.libpng.org/pub/png

*  -no-mng ............ Do not compile in MNG I/O support.
    -system-libmng ..... Use libmng from the operating system.
                         See http://www.libmng.com

*  -no-jpeg ........... Do not compile in JPEG I/O support.
    -system-jpeg ....... Use jpeglib from the operating system.
                         See http://www.ijg.org

*  -no-nas-sound ...... Do not compile in NAS sound support.
    -system-nas-sound .. Use NAS libaudio from the operating system.
                         See http://radscan.com/nas.html

    -no-<module> ....... Disables a module, where module can
                         can be one of: opengl table network canvas

    -kde ............... Builds the Qt Designer with KDE 2 support, so that
                         KDE 2 widgets can be used directly in
                         the Qt Designer. $KDEDIR must be
                         set to point to a KDE 2 installation.
                         See http://www.kde.org

    -tslib ............. Enable TSlib (touchscreen library) mouse handler.
                         See http://arm.linux.org.uk

    -no-g++-exceptions . Disable exceptions on platforms using the GNU C++
                         compiler by using the -fno-exceptions flag.

    -no-xft ............ Disable support for Anti-Aliased fonts through the
                         Xft extension library (XFree86 4.0.2 and newer).
    -xft ............... Enable support for Anti-Aliased fonts.

                         Xft support is auto-detected, but you may use these
                         flags to explicitly enable/disable support.

    -platform target ... The platform you are building on (linux-g++)
    -xplatform target .. The platform when cross-compiling.

                         See the PLATFORMS file for a list of supported
                         operating systems and compilers.

    -Istring ........... Add an explicit include path.
    -Lstring ........... Add an explicit library path.
    -Rstring ........... Add an explicit dynamic library runtime search path.
    -lstring ........... Add an explicit library.


Qt/Embedded only:

    -embedded .......... Enable building of Qt/Embedded.

    -qconfig local ..... Use src/tools/qconfig-local.h rather than the
                         default (qconfig.h).

    -depths list ....... Comma-separated list of supported bit-per-pixel
                         depths, from:  v, 4, 8, 16, 18, 24, and 32.  'v' is VGA16.

    -accel-snap ........ Enable SciTech SNAP Graphics acceleration.
    -accel-voodoo3 ..... Enable Voodoo3 acceleration.
    -accel-mach64 ...... Enable Mach64 acceleration.
    -accel-matrox ...... Enable Matrox MGA acceleration.
    -qvfb .............. Enable X11-based Qt Virtual Frame Buffer.
    -vnc ............... Enable VNC server (requires network module).
    -keypad-mode ....... Enable keypad widget navigation.
    -keypad-input ...... Include keypad keys.
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
这个阶段正是我事业的上升期,我怎么能走得开呢?
级别: 精灵王
UID: 3197
精华: 3
发帖: 770
金钱: 6995 两
威望: 5398 点
贡献值: 21 点
综合积分: 1600 分
注册时间: 2008-12-30
最后登录: 2010-12-31
9楼  发表于: 2009-06-30 19:02
加了也没用,Qt/Embedded 2.0的多线程对Qtopia是无效的