編譯過程出現錯誤:
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__
""
(注意:是兩個下劃線)