QT QTE Qtopia 安装问题集锦

编译过程出现错误:

error 1


/root/2410clQt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能将‘int remove(const char*)’的实参‘1’从‘QValueListIterator<QMap<QString, QString> >’转换到‘const char*’
/root/2410clQt/qt-2.3.2/include/qvaluestack.h: In member function ‘T QValueStack<T>::pop() [with T = QString]’:
xml/qxml.cpp:2502:   instantiated from here
/root/2410clQt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能将‘int remove(const char*)’的实参‘1’从‘QValueListIterator<QString>’转换到‘const char*’
make[2]: *** [xml/qxml.o] 错误 1
make[2]: Leaving directory `/root/2410clQt/qt-2.3.2/src'
make[1]: *** [sub-src] 错误 2
make[1]: Leaving directory `/root/2410clQt/qt-2.3.2'
make: *** [init] 错误 2


solving :

gedit $QTDIR/include/qvaluestack.h &

将remove( this->fromLast() );改为this->remove( this->fromLast() );

 

QT/Embeded 安装

 

error2

qsortedlist.h中51行clear()函数出错
在其前面加this->


error3
/zylinux/x86-qtopia/qt-2.3.7/include/qwindowsystem_qws.h:229: 错误:‘QWSInputMethod’未声明

gedit qwindowsystem_qws.h

在前面增加以下一行

class QWSInputMethod;


error4
qgfxvfb_qws.cpp 中is_screen_gfx,xoffs,yoffs,clipbounds,未声明
打开此文件,在所有未声明变量前加this->

qgfxtransformed_qws.cpp 中xoffs,yoffs,width,height,srcbits,buffer,srcwidgetoffs,srcwidth,srcheight,srcwidgetoffs等未声明
打开此文件,在所有未声明变量前加this->

 

error5
qvaluestack.h:57: 错误:不能将‘int remove(const char*)’的实参‘1’从‘QValueListIterator<QString>’转换到‘const char*’
与error1同解

 

Qtopia安装问题

error6
backend/event.cpp: In static member function ‘static int Event::dayOfWeek(char)’:
backend/event.cpp:404: 错误:ISO C++ 认为有歧义,尽管第一个备选的最差类型转换要好于第二个备选的最差类型转换
backend/event.cpp:404: 附注:备选 1: operator<=(int, int) <内建>
/zylinux/x86-qtopia/qt-2.3.7/include/qstring.h:306: 附注:备选 2: int operator<=(char, QChar)
backend/event.cpp:404: 错误:ISO C++ 认为有歧义,尽管第一个备选的最差类型转换要好于第二个备选的最差类型转换
backend/event.cpp:404: 附注:备选 1: operator<=(int, int) <内建>


修改此文件
将while ( !( i & day ) && i <= Event::SUN ) 行改为
while ( !static_cast<int>(( i & day ) && i) <= Event::SUN )


error7
qdawg.cpp:243: 错误:有多余的限定‘QDawgPrivate::’在成员‘QDawgPrivate’上

解决办法:
找到qdawg.cpp文件,把其中的该行修改为:
    ~QDawgPrivate()
    {
        delete memoryFile;
    }

即删除“QDawgPrivate::”

 

error8

img.c:错误:对’pgm_iformat’的静态声明出现在非静态声明之后

解决办法:

文件头部有extern AVInputFormat pgm_iformat;的非静态声明,在前面加上static AVInputFormat pgm_iformat静态声明;其他变量同理


mpeg.c:错误:对‘mpeg1system_mux’的静态声明出现在非静态声明之后

解决办法:同上

 

error9

/linux-x86-g++/mpegvideo_mmx.o i386/mpegvideo_mmx.c
i386/mpegvideo_mmx.c: In function `dct_quantize_MMX':
i386/mpegvideo_mmx_template.c:88: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[1]: *** [.obj/linux-x86-g++/mpegvideo_mmx.o] Error 1
make[1]: Leaving directory `/home/qt/qtopia-free-1.7.0/src/3rdparty/libraries/libavcodec'
make: *** [3rdparty/libraries/libavcodec] Error 2

从错误提示来看,应该是你编译的时候所设的configure参数不对,
如果你是交叉编译arm的话
看看是否是:
./configure  -platform linux-arm-g++
同时检查TMAKEPATH参数TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++

如果是编译PC机的,使用linux-x86-g++ 时,会出错,应该使用linux-generic-g++(我前几天编译的时候也是错在这个地方)


error10

编译提示qtopia-free-1.7.0/src/3rdparty/plugins/codecs/libffmepg中文件yuv2rgb.cpp第131行代码

c_this->y_buffer=(uint8_t*)c_this->y_chunk=0

是想实现先把0赋值给y_chunk,,定义为void*,然后在强制转换为uint8_t*赋值给y_buffer.但是执行时会先将y_chunk 转换为uint8_t*, 而被装换后就变成了地址值,而不是变量了,所以提示错误为赋值操作符左值应为一个变量。

解决办法:

c_this->y_buffer=(uint8_t*)c_this->y_chunk=0

前后改成:

if (c_this->y_chunk) {
    free (c_this->y_chunk);
    c_this->y_chunk = 0;
    c_this->y_buffer = (uint8_t *)c_this->y_chunk;
  }
  if (c_this->u_chunk) {
    free (c_this->u_chunk);
    c_this->u_chunk = 0;
    c_this->u_buffer = (uint8_t *)c_this->u_chunk;
  }
  if (c_this->v_chunk) {
    free (c_this->v_chunk);
    c_this->v_chunk = 0 ;
    c_this->v_buffer = (uint8_t *)c_this->v_chunk;
}

 (同理在846行中也会有赋值操作符左值应为一个变量的错误提示

该把代码

(uint_8*)c_this->table_rV[i] += c_this->entrysezi*(gamma-(c_this->gamma));

改为

c_this->table_rV[i]=(uint_8*)c_this->table_rV[i] +c_this->entrysezi*(gamma-(c_this->gamma));

如果只是简单的去掉前面的(uint_8*),会提示(void*)不能用在算术操作中)


error11
netbuf.c:152: 错误:expected ‘)’ before string constant

找到glib.h文件 在
#define G_GNUC_FUNCTION             __FUNCTION__
加上
#define __FUNCTION__                ""
(注意:是两个下划线)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值