Thread: Linking problems trying to compile QT application

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    277

    Linking problems trying to compile QT application

    Guys im trying to do the exercise of http://doc.trolltech.com/4.0/tutorial-t1.html
    but im stuck with the following errors:
    Code:
    g++ -c -pipe -Wall -W -O2 -march=athlon-xp -pipe -DQT_NO_DEBUG  -I/usr/qt/3/mkspecs/linux-g++ -I. -I. -I/usr/qt/3/include -o exercise1.o exercise1.cpp
    exercise1.cpp:7:28: QApplication: No such file or directory
    exercise1.cpp:8:27: QPushButton: No such file or directory
    exercise1.cpp: In function `int main(int, char**)':
    exercise1.cpp:12: error: `QApplication' undeclared (first use this function)
    exercise1.cpp:12: error: (Each undeclared identifier is reported only once for
       each function it appears in.)
    exercise1.cpp:12: error: parse error before `(' token
    exercise1.cpp:14: error: `QPushButton' undeclared (first use this function)
    exercise1.cpp:15: error: `hello' undeclared (first use this function)
    exercise1.cpp:18: error: `app' undeclared (first use this function)
    exercise1.cpp:11: warning: unused parameter `int argc'
    exercise1.cpp:11: warning: unused parameter `char**argv'
    exercise1.cpp:19:6: warning: no newline at end of file
    make: *** [exercise1.o] Error 1
    it is not finding the includes but they are there where the path points any ideas?

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    Fixed I was using an older version of qt than the lastest one.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problems with my first attempt at a Qt application...
    By Captain Penguin in forum C++ Programming
    Replies: 0
    Last Post: 10-01-2002, 09:14 PM
  2. Qt Manual problems
    By rip1968 in forum Linux Programming
    Replies: 0
    Last Post: 08-15-2002, 03:59 PM
  3. error LNK2001: unresolved external symbol
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 07-12-2002, 08:45 PM
  4. Few problems with console application
    By GaPe in forum C Programming
    Replies: 12
    Last Post: 04-03-2002, 01:19 PM
  5. Compile Problems
    By Eber Kain in forum C++ Programming
    Replies: 1
    Last Post: 08-26-2001, 01:50 PM