Thread: problem with linking with QtCreator "error: collect2: ld..."

  1. #1
    Registered User hakermania's Avatar
    Join Date
    Apr 2010
    Posts
    3

    Unhappy problem with linking with QtCreator "error: collect2: ld..."

    I am trying to link some .h files but there is the following error:
    Code:
    :-1: error: collect2: ld returned 1 exit status
    followed by notes like these:
    Code:
    /home/alex/Qt/test2/main.cpp:40: undefined reference to `LCDRange::setValue(int)'
    /home/alex/Qt/test2/main.cpp:26: undefined reference to `CannonField::CannonField(QWidget*)'
    I cannot understand why this is happening.....
    Somebody else had the same problem and a recommended solution was to install either libgd2-noxpm either libgd2-xpm either libgd2-noxpm-dev or libgd...
    The other user tried to do so with no good result. So did I...
    Can anyone help me?
    i use Ubuntu 9.10 and using
    Qt Creator 1.2.1
    Based on Qt 4.5.2 (32 bit)

    Built on Sep 1 2009 at 17:30:22

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Those methods are not implemented in your files. The compiler compiled them as references to code implemented elsewhere, but when the linker went looking for the implementation, it couldn't find them.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Problem with linking .LIB
    By lapo in forum C Programming
    Replies: 2
    Last Post: 10-31-2007, 03:41 AM
  3. Linking problem
    By Agent89 in forum C++ Programming
    Replies: 4
    Last Post: 03-27-2005, 03:03 PM
  4. Long file linking problem
    By hypertension in forum C Programming
    Replies: 3
    Last Post: 10-15-2002, 09:55 PM
  5. Linking problem...
    By BrianK in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2002, 04:13 PM