[uClibc] Re: Porting qt-3.2.3 to NMS9200 - libstdc++ ("new operator workaround")

Trilok Soni trilok_ulug at yahoo.co.in
Sun Jan 11 10:44:31 UTC 2004


Hi Manav,

Good to see atleast one reply from uClibc. I think
uClibc may be lacking C++ support/ __or__ I am wrong
somewhere. 

But as I have tried several toolchains, I think it is
not my fault/errors. Hope I will get something out of
real uClibc guys or their experiences. Becuase this
may be heaviest application/libraries I am compiling
against uClibc. 

---
Erik:
I think cross-compiling qt and running it agains
uClibc may be good benchmark for it. 
----

Regards,
Trilok Soni.

 --- Manav <manavgautam at yahoo.com> wrote: > Hiya
>     Didnt really know we could get QT up with uClibc
> ..
> I believe u gonna be the first one cause uClibc is
> not
> that great with Qt . 
> 
> --- Trilok Soni <trilok_ulug at yahoo.co.in> wrote:
> > Hi All,
> > 
> > As per my previous emails, I am porting qt-3.2.3
> on
> > NeoMagic NMS9200 Board. 
> > 
> > I do have frame buffer driver. I do have keyboard.
> I
> > do not have touch screen driver. I do have working
> > linux-2.4.18-rmk5-mm5 kernel. 
> > 
> > Now I have created toolchain based on buildroot
> with
> > gcc-3.2.3 and uclibc-0.9.20. My simple qt hello
> > world
> > application unable to create an application
> object,
> > to
> > which I had replaced with this code. 
> > 
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <qapplication.h>
> > #include <qpushbutton.h>
> > 
> > //To overload new and delete operator...
> > //From qt documentation - performance.html
> > 
> > void *operator new [] (size_t size)
> > {
> > 	return malloc(size);
> > 
> > }
> > 
> > void *operator new ( size_t size )
> > {
> > 	return malloc(size);
> > 
> > }
> > 
> > void operator delete [] (void *p)
> > {
> > 
> > 	 free(p);
> > }
> > 
> > void operator delete [] (void *p, size_t size)
> > {
> > 	 free(p);
> > 
> > }
> > 
> > void operator delete ( void *p)
> > {
> > 	free (p);
> > 
> > }
> > 
> > void operator delete ( void *p, size_t size)
> > {
> > 	free (p);
> > 
> > }
> > 
> > void myMessageOutput(QtMsgType type, const char
> > *Msg)
> > {
> > 	switch(type){
> > 	case QtDebugMsg:
> > 		fprintf(stderr, "Debug: %s\n", Msg);
> > 	break;
> > 	case QtWarningMsg:	
> > 		fprintf(stderr, "Warning: %s\n", Msg);
> > 	break;
> > 	case QtFatalMsg:	
> > 		fprintf(stderr, "Fatal: %s\n", Msg);
> > 		abort();
> > 	}	
> > }
> > 
> > int main(int argc, char **argv){
> > 	qInstallMsgHandler( myMessageOutput );	
> > 	qDebug("Message Handler Installed");
> >         /* If I do this then QApplication object
> is
> > create...- Is it the valid way - I think it is*/
> > 	QApplication a = new QApplication(argc, argv);
> > 	qDebug("hello, world 02\n");
> > 	QPushButton hello("Hello,World", 0);
> > 
> > 	hello.resize(100,30);
> > 
> > 	a.setMainWidget( &hello );
> > 	hello.show();
> > 	return 	a.exec();
> > 	
> > }
> > I am representing here small output from my
> program
> > along with debug messages, which can help someone.
> 
> > 
> > #./hello -qws -nokeyboard -nomouse -noswcursor 
> > 
> > Debug: TRS: QApplication::QApplication
> > constructor...
> > Debug: TRS: construct:Before init_precmdline
> > Debug: TRS: init_precmdline() complete
> > Debug: TRS: Entering into qt_init()
> > Debug: TRS: type = GuiServer
> > Debug: TRS: Argument parsed e.g. -qws
> > Debug: TRS: disp success...
> > Debug: TRS: checking startup flags...
> > Debug: TRS: Not a qwsServer...
> > Debug: TRS: QWSServer::QWSServer
> > Debug: TRS: QWSServer..allocation
> > Debug: Open Display called...
> > Debug: Open Display called...
> > Debug: TRS: init_display() - Not a server=client
> > Debug: TRS: init_display Connect to fb
> > server...called
> > Debug: TRS: QPaintDevice::qwsDisplay() called
> > Debug: TRS: init_display Application Name is being
> > set
> > Debug: TRS: Before qt_set_qws_resource()
> > Debug: TRS: After qt_set_qws_resource()
> > Debug: call to region manager...
> > Debug: call to devicewidth..
> > Debug: call to deviceHeight...
> > Debug: call to screenGfx...
> > Debug: Open Display complete...
> > Debug: TRS: QWSServer::QWSServer screenSaverWake()
> > Debug: TRS: QWSServer::QWSServer QWSClient()
> > Debug: TRS: QWSServer::initializeCursor() send
> mouse
> > event called ...
> > Debug: TRS: QWSServer::initializeCursor() send
> mouse
> > event ...
> > Debug: TRS: QWSServer::QWSServer initialzeCursor()
> > Debug: TRS: QWSServer::QWSServer paintBackground()
> > Debug: TRS: QWSServer::QWSServer complete()
> > Debug: TRS: startup completed...
> > Debug: TRS: Environment Variable is set
> QWS_DISPLAY
> > Debug: TRS: qt_is_gui_used...
> > Debug: TRS: Returning from qt_init()
> > Debug: TRS: construct: After qt_init
> > Debug: TRS: process_cmdline gui is used...
> > Debug: TRS: process_cmdline returning ...
> > Debug: TRS: QApplication::initialize...
> > Debug: TRS: QApplication:: Mapper created...
> > Debug: TRS:: QApplication::initialize complete...
> > Debug: TRS: QApplication::construct getting rect()
> > Debug: TRS: QApplication desktop() object
> > creation...
> > Debug: TRS QWidget::create() called
> > Debug: TRS QWidget::  Get the display fbdpy
> > Debug: TRS: QPaintDevice::qwsDisplay() called
> > Debug: TRS QWidget::  Got the display...
> > Debug: TRS QWidget::  Got popup...
> > Debug: TRS QWidget::  Set Width and hight...
> > Debug: TRS QWidget::  Finally came here...2
> > Debug: TRS QWidget::  Finally came here...3
> > Debug: Testing...
> > Debug: TRS QWidget::  Finally came here...4
> > Debug: TRS QWidget::  Finally came here...5
> > Debug: TRS QWidget::  Finally came here...7
> > /qtest #
> > 
> > I had disabled sendMouseEvent() function in
> > IntializeCursor() and defined #define
> > QT_QWS_NO_SW_CURSOR ...
> > 
> > But still program failing to create valid qt_fbdpy
> > object...and it failes in QWidget_qws.cpp ->
> > create()
> > -> qwDispaly()->nameRegion(...) ..Because it is
> not
> > finding valid qt_fbdpy object returned by
> > qwDisplay()...
> > 
> > Above programs paints background on my TFT Panel
> > with
> > default green color..that's the only output I am
> > getting.
> > 
> > 
> > Regards,
> > Trilok Soni.
> > 
> > 
> >
> 
=== message truncated === 

________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com



More information about the uClibc mailing list