(OT) QThread, does it work?

W. Tasin tasin at fhm.edu
Wed Mar 28 18:39:27 BST 2001


Reijo Korhonen wrote:

> 
> Tobias Erbsland wrote:
> 
>> I had tried not for 2 hours compile a small project with a QThread class:
>> 
>> class ServerThread : public QThread
>> {
>>   public:
>>     virtual void run();
>> }
>> 
>> But the liker failed every time, telling me her doesn't find 
>> "QThread::start()" etc...
>> 
> <clip> I used the --enable-mt option with ./configure.
> 
>> 
>> Hope someone can help me, i tried many things but nothing seems solve 
>> the problem.
>> 
> 
> I edited Makefiles by hand -lqt -> -lqt-mt ;-(. This works until you 
> change your project by adding or deleting files. But then you can edit 
> Makefiles again ;-( Little messy.

Hi,


Please NEVER edit Makefiles by hand!!!

Makefile is created from Makefile.in (by configure), which is created 
from Makefile.am (primarily by automake). So every changement there will 
be lost on another automake/configure call.


Your problem must be another one:

---
EITHER you run into a template bug of KDevelop :-(:

Please look into "Project"/"Options"/"Linker Options":

If you see there in the group "Libraries" "qt" unchecked
and the string "-lqt" inside "additional libraries", so
simply check "qt" and remove the string "-lqt" and test again.

After that your myProject/myProject/Makefile.am should contain
[targetname]_LDADD= ..... $(LIB_QT) ....
instead of
[targetname]_LDADD= ..... -lqt ....

---

OR you have an old automake framework or a framework which doesn't 
consider these points (e.g. C-terminal-project/C++-terminal-project) 
similar.

Please test the following:

1) do a configure --help (if your framework supports --enable-mt)
2) do a configure --enable-mt
3) look inside the created myProject/myProject/Makefile:

you should find the following lines:

LIB_QT = -lqt-mt $(LIBPNG) $(LIBJPEG) -lXext ...
CPPFLAGS = -DQT_THREAD_SUPPORT ...

and last but not least the "Makefile.am"s should have (as mentioned above):

[targetname]_LDADD= ..... $(LIB_QT) ....


Ciao

Walter
-- 
-- 
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,
FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list