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

This is a discussion on problem with linking with QtCreator "error: collect2: ld..." within the C++ Programming forums, part of the General Programming Boards category; I am trying to link some .h files but there is the following error: Code: :-1: error: collect2: ld returned ...

  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
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,655
    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, 04: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, 10:55 PM
  5. Linking problem...
    By BrianK in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2002, 05:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21