Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, February 2007
QT4.3.0 undefined references g_thread_init and clock_gettime


Message 1 in thread

Hi-

I just tried compiling against 4.3.0 snapshot 2-03
and got the following linking:

/usr/local/qt-4/lib/libQtCore.a(qeventdispatcher_glib.o): In function `QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*)':
qeventdispatcher_glib.cpp:(.text+0xa2d): undefined reference to `g_thread_init'
/usr/local/qt-4/lib/libQtCore.a(qeventdispatcher_glib.o): In function `QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*)':
qeventdispatcher_glib.cpp:(.text+0x156d): undefined reference to `g_thread_init'
/usr/local/qt-4/lib/libQtCore.a(qeventdispatcher_unix.o): In function `QTimerInfoList::getTime(timeval&)':
qeventdispatcher_unix.cpp:(.text+0x52e): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status

I compiled 4.3.0 -static

Not sure where these symbols come from?
Thanks,
Jeff

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

On Monday 05 February 2007 06:06, Jeff Lacki wrote:
> I compiled 4.3.0 -static
>
> Not sure where these symbols come from?

g_thread_init() is defined in glib, clock_gettime() in librt. You'll need to 
link with these libraries explicitly since you've built statically. Are you 
using qmake? Normally, qmake automatically adds the needed libraries to the 
link step.

-- 
 [ signature omitted ] 

Message 3 in thread

Bradley T Hughes wrote:

>On Monday 05 February 2007 06:06, Jeff Lacki wrote:
>  
>
>>I compiled 4.3.0 -static
>>
>>Not sure where these symbols come from?
>>    
>>
>
>g_thread_init() is defined in glib, clock_gettime() in librt. You'll need to 
>link with these libraries explicitly since you've built statically. Are you 
>using qmake? Normally, qmake automatically adds the needed libraries to the 
>link step.
>
>  
>
Thanks Brad, actually Im using scons and have to manually add them.  I 
had glib-2.0, but it turns out
g_thread_init was in libgthread-2.0, but it helped me find it.

A second issue/question...now that it compiled, my QGraphicsItems dont 
show up on my QGraphicsScene/
QGraphicsView.  Is there any online docs yet for 4.3?  I believe I must 
be missing something that turns
on the items on-screen now or??

Id love to start using 4.3 asap.

Thanks again,
Jeff



To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 4 in thread

On Monday 05 February 2007 18:44, Jeff Lacki wrote:
> Bradley T Hughes wrote:
> >On Monday 05 February 2007 06:06, Jeff Lacki wrote:
> >>I compiled 4.3.0 -static
> >>
> >>Not sure where these symbols come from?
> >
> >g_thread_init() is defined in glib, clock_gettime() in librt. You'll need
> > to link with these libraries explicitly since you've built statically.
> > Are you using qmake? Normally, qmake automatically adds the needed
> > libraries to the link step.
>
> Thanks Brad, actually Im using scons and have to manually add them.  I
> had glib-2.0, but it turns out
> g_thread_init was in libgthread-2.0, but it helped me find it.

Ahh, right. Forgot about libgthread-2.0.

> A second issue/question...now that it compiled, my QGraphicsItems dont
> show up on my QGraphicsScene/
> QGraphicsView.  Is there any online docs yet for 4.3?

No clue :/ All the examples work for me; do they work for you?

> I believe I must be missing something that turns on the items on-screen now
> or?? Id love to start using 4.3 asap.

Does your code work with 4.2? Also, keep in mind that "4.3" is constantly 
changing, so things may break from time to time (no matter how hard we try 
not to do so).

-- 
 [ signature omitted ] 

Message 5 in thread

>> A second issue/question...now that it compiled, my QGraphicsItems dont
>> show up on my QGraphicsScene/
>> QGraphicsView.  Is there any online docs yet for 4.3?

> No clue :/ All the examples work for me; do they work for you?

I should have checked (didnt think of that :))  yes they work.

>> I believe I must be missing something that turns on the items on-screen now
>> or?? Id love to start using 4.3 asap.

> Does your code work with 4.2? Also, keep in mind that "4.3" is constantly 
> changing, so things may break from time to time (no matter how hard we try 
> not to do so).

Im currently working with 4.2.2 and all is well.  I realize things can break
occassionaly, but this is the 3rd snapshot Ive tried.  I create an object
like this:

	QGraphicsScene *scene = new QGraphicsScene(_parent);

	QPainterPath qp;
	QGraphicsPathItem *gpi = new QGraphicsPathItem(qp);

	QGraphicsRectItem *r = new QGraphicsRectItem(QRectF(20,20,50,50), gpi, scene);
	r->setBrush(QBrush(QColor(Qt::blue),Qt::SolidPattern));
	r->setZValue(900);
	r->show();

I have about 20 objects I do like this, various QGraphicItems.
All have worked fine til 4.3.  If I could see the doc's for 4.3
I may be able to find out what Im not setting?  Ill have to take
a look at the examples and dig around if no 4.3 docs are available,
but it has to be a one-liner I would imagine.

Jeff




To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx