Results 1 to 4 of 4

Thread: compilling in linux mandriva

  1. #1
    Join Date
    Jul 2008
    Posts
    25
    Thanks
    4
    Qt products
    Qt4

    Default compilling in linux mandriva

    I have 'main.cpp':

    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7. QPushButton hello("Hello world!");
    8. hello.resize(100, 30);
    9. hello.show();
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 

    How can I compile it ?

    Qt Code:
    1. c++ -o prog main.cpp
    To copy to clipboard, switch view to plain text mode 
    doesn't work

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: compilling in linux mandriva

    See commands and their explanations at the end of Tutorial 1.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2008
    Posts
    25
    Thanks
    4
    Qt products
    Qt4

    Default Re: compilling in linux mandriva

    but:

    Qt Code:
    1. qmake -project
    2. bash: qmake: command not found
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: compilling in linux mandriva

    Which means Qt is not installed properly on your system. Try setting /path/to/Qt/bin in your PATH variable and run the qmake command again.

    Also, did you create the .pro file for your project?

Similar Threads

  1. Mandriva Linux question
    By Salazaar in forum General Discussion
    Replies: 52
    Last Post: 25th November 2007, 20:44
  2. Replies: 2
    Last Post: 9th June 2007, 19:19

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.