Results 1 to 8 of 8

Thread: configuration for my .pro (and collect2: ld returned 1 exit status)

  1. #1
    Join Date
    May 2011
    Posts
    122
    Thanks
    34
    Platforms
    Windows

    Default configuration for my .pro (and collect2: ld returned 1 exit status)

    hello all,

    I am doing a project on windows and when I do a qmake and then I compile all works very well

    => I switched to Linux and it does not work at all (even the QMake), in fact I had to give in. Pro ​​addresses of bookstores I used to clear all the error messages:
    Qt Code:
    1. INCLUDEPATH + = / usr/local/qwt-6.0.2-svn/include
    2. LIBS + = / usr/local/qwt-6.0.2-svn/lib
    To copy to clipboard, switch view to plain text mode 

    => Now an error message appears:
    collect2: ld returned 1 exit status

    => I searched the net and I understand the need to put in the. Pro ​​this:
    Qt Code:
    1. DEPENDPATH + = / home / first name / myproject
    To copy to clipboard, switch view to plain text mode 

    [b] I also do this but it did not change [/ b]

    can you tell me how please?
    - I'm sure my code works because I just retested at the time on windows
    - This type of error message may appear when it was already in our program running but it is not my case (I restarted the PC and started the program (1 time) to be sure)

  2. #2
    Join Date
    Jul 2011
    Posts
    12
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    maybe :

    LIBS + = -L/usr/local/qwt-6.0.2-svn/lib

    it seems a problem of link

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    Are you guys deliberately inserting extraneous spaces into your [code][/code] blocks or is the forum doing that for you?

    Just like on Windows, the LIBS variable specifies search paths for libraries (-L) and the names of the required libraries (-l):
    Qt Code:
    1. win32 {
    2. INCLUDEPATH += C:/qwt-6.0.2-svn/include
    3. LIBS += -LC:/qwt-6.0.2-svn/lib -lqwt6
    4. }
    5. unix {
    6. INCLUDEPATH += /usr/local/qwt-6.0.2-svn/include
    7. LIBS += -L/usr/local/qwt-6.0.2-svn/lib -lqwt6
    8. }
    To copy to clipboard, switch view to plain text mode 
    Only the paths change.

  4. #4
    Join Date
    May 2011
    Posts
    122
    Thanks
    34
    Platforms
    Windows

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    thank for your help
    Quote Originally Posted by nosleduc View Post
    maybe :
    LIBS + = -L/usr/local/qwt-6.0.2-svn/lib
    it seems a problem of link
    when i put this "-L" a lot of error appears

    Quote Originally Posted by ChrisW67 View Post
    Are you guys deliberately inserting extraneous spaces into your [code][/code] blocks or is the forum doing that for you?
    it's the forum which insert spaces

    Quote Originally Posted by ChrisW67 View Post
    Just like on Windows, the LIBS variable specifies search paths for libraries (-L) and the names of the required libraries (-l):
    Qt Code:
    1. unix {
    2. INCLUDEPATH += /usr/local/qwt-6.0.2-svn/include
    3. LIBS += -L/usr/local/qwt-6.0.2-svn/lib -lqwt6
    4. }
    To copy to clipboard, switch view to plain text mode 
    Only the paths change.
    it don't works
    Last edited by 21did21; 6th September 2011 at 19:13.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    Excellent, so we have "a lot of error appears" and "it don't works" but absolutely no attempt to describe why or how it doesn't work.

    What do you expect us to do to help?

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

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    Quote Originally Posted by 21did21 View Post
    it's the forum which insert spaces
    No, it's not:
    Qt Code:
    1. DEPENDPATH += /home/first name/myproject
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    Qt Code:
    1. CONFIG += qwt
    To copy to clipboard, switch view to plain text mode 

    When you have installed Qwt properly this line does all what you need.

    Uwe

  8. #8
    Join Date
    May 2011
    Posts
    122
    Thanks
    34
    Platforms
    Windows

    Default Re: configuration for my .pro (and collect2: ld returned 1 exit status)

    ok thanks, i will try to re-install

    see you later

Similar Threads

  1. qt 4.6 and mesa configuration
    By bany in forum Qt Programming
    Replies: 0
    Last Post: 31st May 2010, 11:56
  2. how to set run configuration in Qt creator?
    By qtlinuxnewbie in forum Newbie
    Replies: 2
    Last Post: 4th March 2010, 07:40
  3. Configuration on txt files
    By baray98 in forum Qt Programming
    Replies: 1
    Last Post: 22nd January 2008, 07:48
  4. Qt configuration
    By Krish_ng in forum Qt Programming
    Replies: 3
    Last Post: 6th August 2007, 10:51
  5. Qt Configuration Problem?
    By Ammar in forum Newbie
    Replies: 1
    Last Post: 17th May 2007, 09:51

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
  •  
Qt is a trademark of The Qt Company.