Results 1 to 5 of 5

Thread: ld returned 1 exit status.....An unsual error

  1. #1
    Join Date
    Sep 2006
    Posts
    102
    Thanks
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question ld returned 1 exit status.....An unsual error

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ld returned 1 exit status.....An unsual error

    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.

  3. #3
    Join Date
    Sep 2006
    Posts
    102
    Thanks
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: ld returned 1 exit status.....An unsual error

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ld returned 1 exit status.....An unsual error

    Quote Originally Posted by shamik View Post
    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.

  5. The following user says thank you to wysota for this useful post:

    shamik (23rd November 2006)

  6. #5
    Join Date
    Sep 2006
    Posts
    102
    Thanks
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: ld returned 1 exit status.....An unsual error

    Thankyou

Similar Threads

  1. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31
  2. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  3. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  4. Fed up with M$ Window$ !!! Why is Tux leaving me alone???
    By fullmetalcoder in forum General Discussion
    Replies: 35
    Last Post: 18th March 2006, 12:57
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.