Qtopia2.2.0 has been compiled successfully. Share your experience.

Source: Internet
Author: User
After a long and painful process (several times I almost gave up), today qtopia2.2.0pc and ARM

After a long and painful process (several times I almost gave up), today qtopia 2.2.0pc and ARM-LINUX have finally been compiled successfully, next, I will share with you the errors encountered during the compilation process of qtopia2.2.0 in the PC version and their solutions. I hope to make progress together with you. (For compilation of arm-linux, see

After a long and painful process (several times almost give up), today qtopia2.2.0pc and ARM-LINUX version are finally compiled successfully, next, I will share with you the errors encountered during the compilation process of qtopia2.2.0 in the PC version and their solutions. I hope to make progress together with you. (For compilation of the arm-linux version, refer to "5 and 6" in the qt porting video provided by Apsara stack 6410. Compile the Third-Party Library first and follow the video. After compiling the third-party library, the rest is almost the same as the pc version)

Environment: ubuntu10.10
Compiler: gcc version 4.4.5
HOST: bensi
Memory: 512 + 256 M
VMware versions: 7.0

Note:
Before compiling, make sure that your ubuntu system has the X11 SDK library. During the Qtopia compilation process, use the header files in the X11SDK and run the following command to complete the installation:
Apt-get install libx11-dev libxext-dev libxtst-dev

In addition, after modifying the first error, before re-compilation, first modify the build script file, because re-execute the build command, the script will delete the qtopia-free-2.2.0 folder that was just compiled, re-decompress, form a new qtopia-free-2.2.0, start to compile, so the modifications just lost meaning. The method for modifying the build script is as follows:
Change rm-fr qtopia-free-2.2.0
Tar xfvz qtopia-free-2.2.0.tar.gz before the two statements respectively add #, comment out, save and exit, re-Execute./build


During the compilation process, many errors will occur, including the ok6410 QT provided by Feiling porting to the encyclopedia, but not all of them listed in the manual, below I will write down the compilation errors I actually encountered during the compilation process and their solutions (some of these errors are not actually encountered and are collected from the Internet for your reference ):

Error 1:
/Usr/bin/ld: cannot find-lXmu
Collect2: ld returned 1 exit status
Error 2:
Creating pngscale... make [1]: Entering directory '/root/yizhi/qtopia-free-2.2.0/qtopia/util/pngscale'
.. Make [1]: *** [.../../bin/pngscale] Error 1
Make [1]: Leaving directory '/root/yizhi/qtopia-free-2.2.0/qtopia/util/pngscale'
Failed to make pngscale
Analysis:
This is because uuid and Xmu are not installed, because the uuid (Universally Unique Identifier,) and xmu library files need to be installed during qtopia2.2.0 compilation.
Solution:

Apt-get install uuid-dev
Apt-get install libxmu-dev libxmu6

Error 3:
External/clearsilver/cgi. c: 22: fatal error: zlib. h: No such file or directory
Compilation terminated.
Make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi. o] Error 1

Solution:
In ubuntu, zlib is called zlib1g, and zlib-devel is called zlib1g. dev.

Sudo apt-get install zlib1g-dev

Error 4:
/Usr/bin/ld: cannot find-lz
Collect2: ld returned 1 exit status
Make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

Solution:
Sudo apt-get install lib32z1-dev

Error 5:
Bison-d-o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/Bin/bash: bison: command not found
Make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127

Solution:
Sudo apt-get install bison

Error 6:
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/Bin/bash: flex: command not found
Make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127

Solution:
Sudo apt-get install flex

Error 7:
/Usr/bin/ld: cannot find-lncurses
Collect2: ld returned 1 exit status
Make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

Solution:
Sudo apt-get install lib32ncurses5-dev

Error 8:
Prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h: 55: fatal error: X11/Xlib. h: No such file or directory
Compilation terminated.
Make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main-common.o] Error 1

Solution:
Sudo apt-get install libx11-dev


Error 9:
Sh: gperf: not found
Calling gperf failed: 32512 at./makeprop. pl line 96.
Make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames. h] Error 25
Make: *** Deleting file 'out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames. H'

Solution:
Sudo apt-get install gperf

Error 10: insufficient open function parameters

/Usr/include/bits/fcntl2.h: 51: error: call to '_ open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

Solution:
For more information, see migrate the encyclopedia to ok6410.

Error 11: Use undefined classes

Error: 'qwsinputmethod' has not been declared
Solution:
For more information, see migrate the encyclopedia to ok6410. (Note: These two classes are used in this file. C ++ allows declaring classes defined elsewhere in the file, reducing the mutual inclusion relationship between header files and speeding up compilation)


Error 12: the header file is missing.
Asm/page. h: No such file or directory
Solution:
For more information, see migrate the encyclopedia to ok6410.


Error 13: type conversion error
Home/work/armqt/qtlibsource/qt-x11/include/qvalue stack. h: In member function't QValueStack : Pop () [with T = QMap ] ':
Xml/qxml. cpp: 513: instantiated from here
/Home/work/armqt/qtlibsource/qt-x11/include/qvalue stack. h: 57: Error: cannot start with 'qvaluelistiterator > 'Convert to 'const char * ', which is the actual parameter '1' (which belongs to 'int remove (const char *)')
/Home/work/armqt/qtlibsource/qt-x11/include/qvalue stack. h: In member function't QValueStack : Pop () [with T = QString] ':
Xml/qxml. cpp: 2502: instantiated from here
/Home/work/armqt/qtlibsource/qt-x11/include/qvalue stack. h: 57: Error: cannot start with 'qvaluelistiterator 'Convert to 'const char * ', which is the actual parameter '1' (which belongs to 'int remove (const char *)')
Solution:
For more information, see migrate the encyclopedia to ok6410.

Error 14: uic tool not found error prompt:

Make [5]:/root/yizhi/host/qtopia-free-2.2.0/qt2/bin/uic: Command not found
Make [5]: *** [.../../include/qtopia/private/passwordbase_p.h] Error 127
Solution:
Cd to your qtopia-free-2.2.0 directory, find. /-name uic will see that uic already exists in other directories. I copy the uic under the qt3/bin directory to qt2/bin.
(Note: during the actual operation, I first reported this error, but after I changed the other errors, this error will automatically disappear. I am a cainiao, I don't know what's going on ,)


Error 15: pointer type conversion error:
Backend/vobject. cpp: In function 'vobject * addGroup (VObject *, const char *)':
Backend/vobject. cpp: 419: error: invalid conversion from 'const char * 'to 'Char *'
Backend/vobject. cpp: In function 'void writeEncString (OFi

Solution:
Modify qtopia-free-2.2.0/qtopia/src/libraries/qtopia/backend/vobject. cpp file 419 rows
Char * dot = strrchr (g, '.'); change to char * dot = (char *) strrchr (g ,'.');



A similar error occurs during compilation.
Wavplugin. cpp: 435: error: invalid conversion from 'const char * 'to 'Char *'
Solution
Modify the 435th line of the qtopia-free-2.2.0/qtopia/src/plugins/codes/wavplugin. cpp File
The modification method is as follows:


Error 16: the compiler cannot find the constructor of the five parameters of the QSizePolicy class.

Ui/release-shared/passwordbase_p.cpp: 35: error: no matching function for call to 'qsizepolicy: SizePolicy (QSizePolicy: SizeType, QSizePolicy: SizeType, int, int, bool )'
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: note: candidates are: QSizePolicy: SizePolicy (int)
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 99: note: QSizePolicy: SizePolicy (QSizePolicy: SizeType, QSizePolicy: SizeType, bool)
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 63: note: QSizePolicy: SizePolicy ()
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 46: note: QSizePolicy: SizePolicy (const QSizePolicy &)

Solution:

The 38-row location in the qtopia-free-2.2.0/qtopia/src/libraries/qtopia/. ui/release-shared/passwordbase_p.cpp File
Prompt = new QLabel (this, "prompt ");
Prompt-> setSizePolicy (QSizePolicy: SizeType) 7, (QSizePolicy: SizeType) 1, 0, 0, prompt-> sizePolicy (). hasHeightForWidth ()));

To:

Prompt = new QLabel (this, "prompt ");
Prompt-> setSizePolicy (QSizePolicy: SizeType) 7, (QSizePolicy: SizeType) 1, prompt-> sizePolicy (). hasHeightForWidth ()));

Remove the 0, 0 parameters.


Error 17 (this is a major type of error that may occur during compilation): The g ++ compiler prompts that there are redundant symbols before the member function, some compilers do not require the class name to be added before the C ++ member function.

Thumbnailview_p.h: At global scope:
Thumbnailview_p.h: 81: error: extra qualification 'thumbnailitem: 'On member' paintItem'
Make [5]: *** [. obj/release-shared/imageselector. o] Eopia/src

Solution:

Line 81st in the qtopia-free-2.2.0/qtopia/src/libraries/qtopia2/thumbnailview_p.h file:

Modify void ThumbnailItem: paintItem (QPainter *, const QColorGroup &);

Void paintItem (QPainter *, const QColorGroup &);

** Similar errors may occur after compilation continues.

Abtable_p.h: 276: error: extra qualification 'phonetypeselector: 'on member 'addtype'
Make [5]: *** [. obj/release-shared/abtable. o] Error 1
Make [5]: Leaving directory '/root/yizhi/host/qtopia-free-2.2.0/qtopia/src/libraries/qtopiapim'
Make [4]: *** [all] Error 2
Solution: Remove PhoneTypeSelector ::

Continue Compilation:
.. /.. /.. /Include/qtopia/pim/private /.. /.. /.. /.. /src/libraries/qtopiapim/numberentry_p.h: At global scope:
.. /.. /.. /Include/qtopia/pim/private /.. /.. /.. /.. /src/libraries/qtopiapim/numberentry_p.h: 106: error: extra qualification 'numberentrydialog: 'on member 'eventfilter'
Make [5]: *** [. obj/release-shared/numberentry. o] Error 1
Make [5]: Leaving directory '/root/yizhi/host/qtopia-free-2.2.0/qtopia/src/libraries/qtopiapim'
Make [4]: *** [all] Error 2

Solution: Remove NumberEntryDialog ::'

Continue Compilation
In file sorted ded from addressbook. cpp: 40:
Ablabel. h: At global scope:
Ablabel. h: 78: error: extra qualification 'ablabel: 'on member' decodeHref"

Solution: Remove 'ablabel ::'

Continue Compilation
In file include from minefiled. cpp: 35
Minefiled. h: 105: error: extra qualification 'minefiled: 'on member
'Setstate'
Minefiled. h: 106: error: extra qualification 'minefiled: 'on member
'Placemines'

Solution:
Edit qtopia-free-2.2.0/qtopia/src/games/minesweep/minefiled. h
Modify row 106 and row 105: delete 'minefiled: '.


Continue Compilation
Buttoneditordialog. h: 56 error: extra qualification 'buttoneditordialog: 'on member
'Action'
Solution:
Edit qtopia-free-2.2.0/qtopia/src/settings/buttoneditor/buttoneditordialog. h
Delete 'buttoneditordialog: '.



Continue Compilation
Packagewizard. h: 106: error: extra qualification 'packagewizard: 'on member appears
'Current'
Solution
Edit qtopia-free-2.2.0/qtopia/src/settings/qipkg/packagewizard. h
Delete 'packageizard: '.

Continue Compilation
The keboard. h: 60 error: extra qualification 'keboardpicks: 'on member appears.
'Keboardpicks'
Solution
Edit qtopia-free-2.2.0/qtopia/src/plugins/inputmethods/keyboard. h
Delete the 'keboardpicks: 'In the first row.

Continue Compilation
Similar errors may also occur, such as extra qualification 'lisheddecoration: 'and 'imtoolbutton ::'



Error 18: Undefined constructor error prompt

. Ui/release-shared/emaildlg. cpp: In constructor 'emaildialogbase: EmailDialogBase (QWidget *, const char *, bool, uint )':
. Ui/release-shared/emaildlg. cpp: 65: error: no matching function for call to 'qsizepolicy: SizePolicy (QSizePolicy: SizeType, QSizePolicy: SizeType, int, int, bool )'
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: note: candidates are: QSizePolicy: sizepolize1_j4

Modify qtopia-free-2.2.0/qtopia/src/applications/addressbook/. ui/release-shared/emaildlg. cpp file 65th rows

OkButton = new QPushButton (this, "okButton ");
OkButton-> setSizePolicy (QSizePolicy: SizeType) 3, (QSizePolicy: SizeType) 0, 0, 0, okButton-> sizePolicy (). hasHeightForWidth ()));
Layout2-> addWidget (okButton );

CancelButton = new QPushButton (this, "cancelButton ");
CancelButton-> setSizePolicy (QSizePolicy: SizeType) 3, (QSizePolicy: SizeType) 0, 0, 0, cancelButton-> sizePolicy (). hasHeightForWidth ()));
Layout2-> addWidget (cancelButton );

Change


OkButton = new QPushButton (this, "okButton ");
OkButton-> setSizePolicy (QSizePolicy: SizeType) 3, (QSizePolicy: SizeType) 0, okButton-> sizePolicy (). hasHeightForWidth ()));
Layout2-> addWidget (okButton );

CancelButton = new QPushButton (this, "cancelButton ");
CancelButton-> setSizePolicy (QSizePolicy: SizeType) 3, (QSizePolicy: SizeType) 0, cancelButton-> sizePolicy (). hasHeightForWidth ()));
Layout2-> addWidget (cancelButton );

Continue Compilation:

Error message :. ui/release-shared/camerabase. cpp: 41: error: no matching function for call to 'qsizepolicy: SizePolicy (QSizePolicy: SizeType, QSizePolicy: SizeType, int, int, bool )'
/Root/yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: note: candidates are: QSizePolicy: SizePolicy (int)

Solution:

Edit row 41st of the qtopia-free-2.2.0/qtopia/src/applications/camera/. ui/release-shared/camerabase. cpp File

Authorization-> setSizePolicy (QSizePolicy: SizeType) 7, (QSizePolicy: SizeType) 7, 0, 0, videocaptureview-> sizePolicy (). hasHeightForWidth ()));

To:

Videocaptureview-> setSizePolicy (QSizePolicy: SizeType) 7, (QSizePolicy: SizeType) 7, videocaptureview-> sizePolicy (). hasHeightForWidth ()));




Next we will paste another point of information collected on the Internet:

1. cocould not find wxWidgets library.

Solution: $ sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common

2. Need libsmbclient. h for compiling on Unix.

Solution: $ sudo apt-get install libsmbclient-dev

3. Need cups. h for compiling on Unix.

Solution: $ sudo apt-get install libcupsys2-dev

4. error: Need opensc/opensc. h.

Solution: $ sudo apt-get install libopensc2-dev

5. exec: g ++: not found.

Solution: $ sudo apt-get install build-essential

6. error: X11/Xlib. h: no such file or directory.

Solution: $ sudo apt-get install libx11-dev

7. error: X11/Xmu/WinUtil. h: no such file or directory.

Solution: $ sudo apt-get install libxmu-dev

8. error: Using Lib. h: no such file or directory.

Solution: $ sudo apt-get install libjpeg-dev

9. error: png. h: no such file or directory.

Solution: $ sudo apt-get install libpng-dev

In general, there are almost several types of errors that can be encountered. The key is where to locate the errors, go to the path, and modify the corresponding errors. I hope that beginners like me will not be confused, I believe everyone will succeed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.