Trolltech Home | Qt-embedded-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-embedded-interest Archive, March 2007
gcc-4.1.1 qt-2.3.10 compile errors


Message 1 in thread

Hello,

We are moving to gcc-4.1.1 for our software packages and am having
trouble getting the C++ in QT-embedded to build with the newer
compilers.

Does Troll Tech still support qt-embedded-2.3.10?

My question is related to the fact that I use OPIE and qt-2.3.10 is
still the recommended version for OPIE develpment, just wondering if
anyone has any patches for 2.3.10 to work with gcc-4.x

So far I have patched 

qwindowsystem_qws.h - 
qpixmapcache.cpp - 

but now it fails on.  Gettin worried that this will continue for a
while.

/home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h: In
member function 'T QValueStack<T>::pop() [with T = QMap<QString,
QString>]':
xml/qxml.cpp:513:   instantiated from here
/home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h:57:
error: cannot convert 'QValueListIterator<QMap<QString, QString> >' to
'const char*' for argument '1' to 'int remove(const char*)'
/home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h: In
member function 'T QValueStack<T>::pop() [with T = QString]':
xml/qxml.cpp:2528:   instantiated from here
/home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h:57:
error: cannot convert 'QValueListIterator<QString>' to 'const char*' for
argument '1' to 'int remove(const char*)'
make[4]: *** [xml/qxml.o] Error 1


Anybody out there patched this C++ stuff to work with new compilers yet?

That would be sweet.

If not, I guess I can do it all and submit the patch if anybody wants
it.

Thanks,

Brian


To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 2 in thread

I have finally "I think" patched qt-2.3.10 to build with gcc-4.1.1
uClibc-0.9.28.1.  It seems to build correctly and run ok.

Here is the diff if anybody is interested.

After hours of googling, I still could not find all the answers to 
getting this to build correctly.  So hopefully this will help anybody
with the same problems.

It didnt end up being as much as I thought it would be, thankfully.  But
lots of virtual declaration warnings on non-virtual destructors.

C++ got real picky in 4.x I guess.

anyway


diff -burN qt-2.3.10.orig/src/kernel/qpixmapcache.cpp
qt-2.3.10/src/kernel/qpixmapcache.cpp
--- qt-2.3.10.orig/src/kernel/qpixmapcache.cpp	2005-01-23
08:00:46.000000000 -0600
+++ qt-2.3.10/src/kernel/qpixmapcache.cpp	2007-03-18 20:45:57.000000000
-0500
@@ -101,7 +101,7 @@
 # define TEST_SHM_AT_RANDOM_LOCATION
 #endif
 
-#define THROW_AWAY_UNUSED_PAGES
+//#define THROW_AWAY_UNUSED_PAGES
 
 // Only define this if there really isn't going to be enough room for
 // a full cache, in which case it really means the cache is set too
large
diff -burN qt-2.3.10.orig/src/kernel/qwindowsystem_qws.h
qt-2.3.10/src/kernel/qwindowsystem_qws.h
--- qt-2.3.10.orig/src/kernel/qwindowsystem_qws.h	2005-01-23
08:00:47.000000000 -0600
+++ qt-2.3.10/src/kernel/qwindowsystem_qws.h	2007-03-18
20:45:23.000000000 -0500
@@ -53,6 +53,8 @@
 class QWSRegionManager;
 class QGfx;
 class QWSServerData;
+class QWSInputMethod;
+class QWSGestureMethod;
 
 class QWSInternalWindowInfo
 {
diff -burN qt-2.3.10.orig/src/tools/qvaluestack.h
qt-2.3.10/src/tools/qvaluestack.h
--- qt-2.3.10.orig/src/tools/qvaluestack.h	2005-01-23 08:00:47.000000000
-0600
+++ qt-2.3.10/src/tools/qvaluestack.h	2007-03-18 20:46:25.000000000
-0500
@@ -54,7 +54,7 @@
     {
 	T elem( this->last() );
 	if ( !this->isEmpty() )
-	    remove( this->fromLast() );
+	    this->remove( this->fromLast() );
 	return elem;
     }
     T& top() { return this->last(); }






On Sun, 2007-03-18 at 19:17 -0500, Brian Austin wrote:
> Hello,
> 
> We are moving to gcc-4.1.1 for our software packages and am having
> trouble getting the C++ in QT-embedded to build with the newer
> compilers.
> 
> Does Troll Tech still support qt-embedded-2.3.10?
> 
> My question is related to the fact that I use OPIE and qt-2.3.10 is
> still the recommended version for OPIE develpment, just wondering if
> anyone has any patches for 2.3.10 to work with gcc-4.x
> 
> So far I have patched 
> 
> qwindowsystem_qws.h - 
> qpixmapcache.cpp - 
> 
> but now it fails on.  Gettin worried that this will continue for a
> while.
> 
> /home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h: In
> member function 'T QValueStack<T>::pop() [with T = QMap<QString,
> QString>]':
> xml/qxml.cpp:513:   instantiated from here
> /home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h:57:
> error: cannot convert 'QValueListIterator<QMap<QString, QString> >' to
> 'const char*' for argument '1' to 'int remove(const char*)'
> /home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h: In
> member function 'T QValueStack<T>::pop() [with T = QString]':
> xml/qxml.cpp:2528:   instantiated from here
> /home/heelrod/stars/crater/dev/build/qt-2.3.10/include/qvaluestack.h:57:
> error: cannot convert 'QValueListIterator<QString>' to 'const char*' for
> argument '1' to 'int remove(const char*)'
> make[4]: *** [xml/qxml.o] Error 1
> 
> 
> Anybody out there patched this C++ stuff to work with new compilers yet?
> 
> That would be sweet.
> 
> If not, I guess I can do it all and submit the patch if anybody wants
> it.
> 
> Thanks,
> 
> Brian
> 
> 
> To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx
> 
> 


To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx