My blog has been moved to ariya.ofilabs.com.

Thursday, January 31, 2008

qt embedded 2.3.x with gcc 4.x

In case you want to build Qt Embedded 2.3.x -- I know it's old but who knows -- with gcc 4.x which is what modern distributions (like the latest OpenSUSE) offer, you might get error messages like this:

In destructor ‘QSortedList::~QSortedList()’:
error: there are no arguments to ‘clear’ that depend on a template parameter, so a declaration of ‘clear’ must be available
error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)

or something similar, because g++ 4.x (actually since 3.4) is stricter than the previous versions with respect to name lookup.

To solve the problem, get my patch: http://pastebin.com/f474708b6. It is tested only for Qt Embedded 2.3.8.

2 comments:

THE MASTER CHEIF said...

wow impressive

Anonymous said...

OPIE and OpenEmbedded projects have some gcc 3.4/4.x patches for QT/Embedded too (for version 2.3.10 and 2.3.12).