PDA

View Full Version : ld returned 1 exit status.....An unsual error



shamik
22nd November 2006, 10:09
hii friends

in my kdevelop project i m getting a very unusual error. the project is a Qt project with one dialog and in Qt the project file and main file are made. then compiled from the terminal using qmake *.pro .....fine . the exe is running and has no errors.

i have then included this in kdevelop. the ui file, ui.h file and the .h file of this project has been included in kdevelop. everything is done without any errors. all the possible changes are also made.

it gives no error when i compile or configure. but as soon as i do make it gives the following error :

/usr/bin/ld : cannot find -lqt-mt
collect2 : ld returned 1 exit status

can anyone please tell me what does this mean??
a similar project in kdevelop is running fine but this project is not.

this file -lqt-mt exists nowhere in /usr/local/qt/lib where i have installed Qt3.3.0 manually.
it even doesnt exist in usr/lib/qt-3.1/lib where the Qt3.1 have been installed bydefault with RH9 installation.


i have set the environment variables like PATH, LD_LIBRARY_PATH..etc so that is not a problem. when i give 'set' command in the then it shows the new path of Qt which i have set. so setting environmental variables is not an issue.

please tell me what to do with this kind of error..



thanks and regards....

shamik

wysota
22nd November 2006, 10:23
This means you don't have a thread-enabled Qt library. Did you compile Qt with thread support? The default installation has to has qt-mt, otherwise KDE (and KDevelop) wouldn't work.

shamik
23rd November 2006, 09:45
I have managed to solve this problem myself.

thankyou so much for the help.

the Qt is really not configured with thread support.

but is there any means to know wheather the qt has been configured with the thread support or not.

and what are the arguments that has to be passed with configure so that thread support is included in Qt.

The way i have solved this problem is very unusual.
I deleted the project folder. Then i created the new project file and did the same thing which i had done previously. It worked and no errors were generated.
The exe is also running as expected.


Thanks and regards
shamik

wysota
23rd November 2006, 09:51
but is there any means to know wheather the qt has been configured with the thread support or not.
Threaded Qt library is called libqt-mt, non-threaded is called libqt.



and what are the arguments that has to be passed with configure so that thread support is included in Qt.
-thread


The way i have solved this problem is very unusual.
I deleted the project folder. Then i created the new project file and did the same thing which i had done previously. It worked and no errors were generated.


It would be enough if you removed the CONFIG+=thread from the project file.

shamik
23rd November 2006, 10:14
Thankyou
:)