QT QTE Qtopia 安装问题集锦

来源:互联网 发布:棒棒糖软件 编辑:程序博客网 时间:2024/05/16 08:30

编译过程出现错误:

error 1


/root/2410clQt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能将‘intremove(constchar*)’的实参‘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:   instantiatedfrom here
/root/2410clQt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能将‘intremove(constchar*)’的实参‘1’从‘QValueListIterator<QString>’转换到‘constchar*’
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: 错误:不能将‘intremove(constchar*)’的实参‘1’从‘QValueListIterator<QString>’转换到‘constchar*’
与error1同解

 

Qtopia安装问题

error6
backend/event.cpp: In static memberfunction ‘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: intoperator<=(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;的非静态声明,在前面加上staticAVInputFormat 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文件 在
#defineG_GNUC_FUNCTION            __FUNCTION__
加上
#define__FUNCTION__               ""
(注意:是两个下划线)