天嵌 ARM开发社区

 找回密码
 注册
查看: 2526|回复: 4

qtopia 多线程

[复制链接]
catamout 发表于 2010-4-28 23:23:08 | 显示全部楼层 |阅读模式
我在一first.CPP 文件中添加如下代码:
#include <qthread.h>
.
.
.
class MyThread : public QThread {   //expected class-name before ‘{’token

            public:
             virtual void run();
};

void MyThread :: run()
{
            sleep(1);  //sleep was not declared in this cope


}



make 时提示如下错误 所在的地方 就是  // 所处的位置.
请问有谁知道这个问题的,或者遇到过 已解决的... 我用的是 Ptopia 2.2.0 .... 谢谢.  是不是 按照天嵌的 软件包的配置 不支持 多线程呀
ZNbutterfly 发表于 2010-4-29 13:26:58 | 显示全部楼层
都是这个问题..
回复

使用道具 举报

 楼主| catamout 发表于 2010-4-29 19:22:27 | 显示全部楼层
没有解决的方法吗?  急...
回复

使用道具 举报

 楼主| catamout 发表于 2010-4-30 09:39:37 | 显示全部楼层
哎....  , 没人知道吗
回复

使用道具 举报

亚瑟王 发表于 2010-5-8 20:37:05 | 显示全部楼层
默认的qtopia-2.2.0的配置单是没有添加对多线程的配置选项的。
建议你将class MyThread : public QThread {   //expected class-name before ‘{’token

            public:
             virtual void run();
};

这段声明放到头文件中,并且添加类似

#ifndef MYTHREAD
#define MYTHREAD





#endif  /* MYTHREAD */
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-6-18 01:00 , Processed in 2.040837 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表