Qtopia2 compilation errors summary and Solutions

Source: Internet
Author: User

Environment: initi6410 ubantu9.10 arm-linux-gcc-3.4.5 (cac6410 cross compiler) GCC version 4.4.1 (PC Linux compiler Version)

 

This section describes how to compile qtopia2.2.0 on. For the PC version and qvfb qtopia2.2.0 compilation, refer.

 

PC environment: ubantu9.10

Development Board: cloud6410

Cross Compiler: arm-linux-gcc4.4.1/ARM-Linux-GCC 4.3.2

 

The following describes how to compile arm qtopia2.2.0.

If you have not installed the arm-linux-gcc-4.4.1 cross compiler, first install the cross compiler under/usr/local/ARM, unzip the arm-linux-gcc-4.4.1 package to this directory to complete the installation.

Note that:

1. When compiling qtopia, make sure that the GNU g ++ compiler is installed in your ubantu9.10 environment. This compiler is used in qtopia compilation to compile some tools to run on PC.

 

2. You must install the X11 SDK library in ubantu. During qtopia compilation, you must use some header files in the x11sdk. Run the following command to install the required files:

# Apt-Get install libx11-dev libxext-dev libxtst-Dev

 

In addition, you need to install UUID (universally unique identifier,) and xmu library files. When compiling qtopia2.2.0, you need these tools and third-party library files running on the PC.

 

Apt-Get install UUID-Dev

Apt-Get install libxmu-dev libxmu6

If UUID and xmu are not installed, the following error occurs:

When xmu is not installed, the compilation prompt is:

/Usr/bin/ld: cannot find-lxmu

When UUID is not installed, the compilation prompt is:

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

 

3. During compilation, the arm-qtopia-free-src-2.2.0.tar.gz file in the virtual machine cannot be placed in the directory shared with windows; otherwise, compilation errors may occur.

 

Note: The following error message is as follows:OrderIf the error is found and processed, you can modify it based on the error type information.

These errors have been solved by myself. I have also summarized some of the methods of other netizens and shared them with you.

 

1. Compilation error: 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:

 

On Ubuntu 9.10, GCC strictly checks the parameter passing of open, if the second parameter is o_creat (like row 143 of qtopia-2.2.0-friendlyarm/qt2/src/tools/qmemoryfile_unix.cpp), the third parameter mode must be passed in. Therefore, manually modify the x86-qtopia-2.2.0/qt2/src/tools/qmemoryfile_unix.cpp 143 row

If (! F)
F = open (tmpfile. Latin1 (), o_creat | o_wronly );
Change
If (! F)
F = open (tmpfile. Latin1 (), o_creat | o_wronly, 0666 );

 

2. Use undefined classes


Error: 'qwsinputmethod' has not been declared

Correction Method:

CD $ qtdir/src/kernel

 

Gedit qwindowsystem_qws.h

Add the following two lines

Class qwsinputmethod;
Class qwsgesturemethod;

 

These two classes are used in this file. c ++ allows declaring classes defined elsewhere in this file, reducing the mutual inclusion relationship between header files and speeding up compilation.

 

3. the header file is missing.

 

Error message:

 

Kernel/qpixmapcache. cpp: 125: 57: Error: ASM/page. h: no such file or directory
Kernel/qpixmapcache. cpp: In constructor 'qsharedmemorymanager: qsharedmemorymanager ()':
Kernel/qpixmapcache. cpp: 539: Error: 'page _ size' was not declared in this scope
Kernel/qpixmapcache. cpp: 539: Error: 'page _ mask' was not declared in this scope
Kernel/qpixmapcache. cpp: In member function 'void qsharedmemorymanager: internal_free (qsmemptr )':
Kernel/qpixmapcache. cpp: 773: Error: 'page _ size' was not declared in this scope
Kernel/qpixmapcache. cpp: 773: Error: 'page _ mask' was not declared in this scope
Make [1]: *** [tmp/release-shared-Linux-generic-G ++-no-keypad/kernel/qpixmapcache. O] Error 1
Make [1]: Leaving directory '/root/Yizhi/host/qtopfolder [

 

 

Solution: The 2.6 kernel does not contain the asm-i386's page. h modify the qt2/src/kernel/qpixmapcache. cpp File

 

# Ifdef throw_away_unused_pages

# Include <sys/Mman. h> // madvise
# Define page_shift 12 // new add 2010-12-10
# Define page_size (1ul <page_shift) // new add 2010-12-10
# Define page_mask (~ (PAGE_SIZE-1) // new add
// # Include <ASM/page. h> // comment out page_size, page_mask, page_align // This line is not needed

 

4 type conversion error

 

/Home/work/armqt/qtlibsource/qt-x11/include/Qvalue stack. h: In member function 'tqvaluestack <t>: Pop () [with T = qmap <qstring, qstring>] ':
XML/qxml. cpp: 513: instantiated from here
/Home/work/armqt/qtlibsource/qt-x11/include/Qvalue stack. h: 57: Error: cannot be converted from 'qvaluelistiterator <qmap <qstring, qstring> 'to 'const char *', is the real parameter '1' (belonging to 'int remove (const char *)')
/Home/work/armqt/qtlibsource/qt-x11/include/Qvalue stack. H: In member function 'tqvaluestack <t >:: POP () [with T = qstring] ':
XML/qxml. cpp: 2502: instantiated from here
/Home/work/armqt/qtlibsource/qt-x11/include/Qvalue stack. h: 57: Error: cannot be converted from 'qvaluelistiterator <qstring> 'to 'const char *'. It is an actual parameter '1' (belonging to 'int remove (const char *)') solution: VI Include/qvaluestack. h

 

 

Solution:
Template <class T>
Class q_export qvaluestack: Public qvaluelist <t>
{
Public:
Qvaluestack (){}
~ Qvaluestack (){}
Void push (const T & D) {append (d );}
T POP ()
{
T ELEM (this-> last ());
If (! This-> isempty ())
This-> remove (this-> fromlast (); // Add "This->" 2010-12-10
Return ELEM;
}

 

5. UIC tool error prompt not found:

 

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 other directories already have UIC, I put qt3/bin

Copy the UIC in the directory to qt2/bin.

 

6. Redundant symbol errors. That is, the class member function does not need to add a class name to the header file.

 

Qdawg. cpp: 294: Error: extra qualification 'qdawgprivate: 'On member 'qdawgprivate'
Make [5]: *** [. OBJ/release-shared/qdawg. O] oo

 

 

Solution:

 

Qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg. cpp

 

Qdawgprivate ::~ Qdawgprivate ()

{

Delete memoryfile;

}

To:

~ Qdawgprivate () // Delete "qdawgprivate ::~ "2010-12-10
{
Delete memoryfile;
}

 

7

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 149 rows

 

Char * dot = strrchr (G, '.'); change to char * dot = (char *) strrchr (G ,'.');

 

8

Error: 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: qsizepolicy (qsizepolicy: sizetype, qsizepolicy: sizetype, Int, Int, bool)'
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: Note: candidates are: qsizepolicy (INT)
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 99: Note: qsizepolicy (qsizepolicy: sizetype, qsizepolicy: sizetype, bool)
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 63: Note: qsizepolicy ()
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 46: Note: qsizepolicy (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.

 

 

 The 9g ++ compiler prompts that there are redundant symbols before the member function. Some compilers require that the class name is not required before the C ++ member function, which is the same as the error at 6th.

 

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 &);

A similar error occurs after compilation.

 

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:

Modify row 276 In the qtopia-free-2.2.0/qtopia/src/libraries/qtopiapim/abtable_p.h File

 

Qlistviewitem * phonetypeselector: addtype (qlistviewitem * previtem,
Qstring number, const char * pixmapname, pimcontact: contactfields phonetype );

 

To:

Qlistviewitem * addtype (qlistviewitem * previtem, qstring number, const char * pixmapname, pimcontact: contactfields phonetype );

 

That is, 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:

Modify qtopia-free-2.2.0/qtopia/src/libraries/qtopiapim/numberentry_p.h 106th rows

Bool numberentrydialog: eventfilter (qobject * o, qevent * E );

Change to bool eventfilter (qobject * o, qevent * E );

 

Continue:

 

Make [5]: Leaving directory '/root/Yizhi/host/qtopia-free-2.2.0/qtopia/src/libraries/mediaplayer'
Make [4]: *** [all] Error 2
Make [4]: Leaving directory '/root/Yizhi/host/qtopia-free-2.2.0/qtopia/src/libraries/mediaplayer'

 

Modify 52 lines of the qtopia-free-2.2.0/qtopia/src/libraries/mediaplayer/videoviewer. cpp File

Simplevideowidget: simplevideowidget (qwidget * parent );

 

After modification:

Simplevideowidget (qwidget * parent); // Constructor

 

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:

 

Modify qtopia-free-2.2.0/qtopia/src/applications/addressbook/ablabel. h 78 rows

Bool ablabel: decodehref (const qstring & href, servicerequest * req, qstring * pm) const;

Change to bool decodehref (const qstring & href, servicerequest * req, qstring * pm) const;

 

10 another undefined constructor error message:

 

. 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: qsizepolicy (qsizepolicy: sizetype, qsizepolicy: sizetype, Int, Int, bool )'
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: Note: candidates are: qsizepolicy: qsizepolize1_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: qsizepolicy (qsizepolicy: sizetype, qsizepolicy: sizetype, Int, Int, bool )'
/Root/Yizhi/host/qtopia-free-2.2.0/qt2/include/qsizepolicy. h: 93: Note: candidates are: qsizepolicy (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 ()));

 

 

Continue compilation. Errors of the same type are not listed here. You can modify the errors according to the error message, save the changes, and continue compilation.


Address: http://blog.csdn.net/yimiyangguang1314/article/details/6068029

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.