Results 1 to 4 of 4

Thread: QApplication & QPushButton not found

  1. #1

    Default QApplication & QPushButton not found

    I just installed QT. I ran the -configure from C:/QT/4.1.2 and I believe that the qmake compiled correctly. However, when I try to run gcc -c main.cpp, this comes up, it says that QApplication and QPushButton were not found. Any thoughts?

  2. #2
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QApplication & QPushButton not found

    Does this happen while building Qt or while building your own program after having built Qt successfully? What is the exact error message? Which OS and exact version of Qt is this?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QApplication & QPushButton not found

    Quote Originally Posted by briahn06
    when I try to run gcc -c main.cpp, this comes up, it says that QApplication and QPushButton were not found.
    Use qmake to generate a Makefile for your project and then compile it using that file.

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

    Default Re: QApplication & QPushButton not found

    Gcc doesn't like C++ programs very much Try g++ instead (using qmake as Jacek suggested should do that for you, as you need some paths to be set which qmake sets for you).

Similar Threads

  1. Visual Studio 2005 Express
    By Muzz in forum Installation and Deployment
    Replies: 22
    Last Post: 6th November 2008, 06:21
  2. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40
  3. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 19:56
  4. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 16:21

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.