Results 1 to 4 of 4

Thread: how config Codeblocks on linux ?

  1. #1
    Join Date
    Nov 2009
    Location
    Poland, Silesia
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how config Codeblocks on linux ?

    Hi,
    Im trying write simple GUI apps using Qt (2009.04) on linux (ubuntu),
    for start learning I want use some "raw" IDE, so i choice codeblocks.
    When I starting create GUI apps project on C::B, on wizard im set path to QT installation directory. (/opt/qt-sd ....), and for moment - when I create my SLOTs all be fine (i can use, label, button etc.), but when i create my slots i have still this error :
    /home/user/dev/QVin/MyWindow.cpp|37|undefined reference to `vtable for MyWindow'|
    On windows for resolve this error (on DEVC+ Qt) must copy file qt-moc-ui-rcc.exe and qt.mak to devC bin folder, but how resolve this problem on linux and codeblocks?

    I can't search answer for my question on codeblocks, because for now, www.codeblocks.org is disable :/


    my header file:



    #include <QtGui>
    #ifndef _MYWINDOW_H_
    #define _MYWINDOW_H_

    class MyWindow: public QMainWindow
    {
    Q_OBJECT

    public:
    MyWindow();
    ~MyWindow();
    private:
    QMenu *filemenu;
    QMenu *about;
    // QToolBar *toolBar;

    QAction *fileOpen;
    QAction *fileSave;
    QAction *appExit;

    private slots:
    void Open();
    void Save();
    };


    #endif

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how config Codeblocks on linux ?

    Does your makefile include running MOC on this headerfile and including the resulting output in your files to be compiled?

  3. #3
    Join Date
    Oct 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how config Codeblocks on linux ?

    This page describes how to do it on ubuntu, but it's the same for all linux versions.
    Besides, you can use symbolic links instead or copying files like mentionned in the tutorial.
    http://www.amazing-tutorials.com/qt/...th-code-block/

  4. #4
    Join Date
    Jan 2008
    Location
    Davao City, Philippines
    Posts
    77
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how config Codeblocks on linux ?

    Had these problem too many times and normaly it's the problem with creating moc files.

    The easiest way is to use Code::Blocks as an editor, then switch with alt->tab to an open terminal window and then call 'make'. It's even faster then using code::blocks for building the application.
    DavaoSOFT, the home of ERPel
    ERPel, das deutsche Warenwirtschaftssystem fuer LINUX
    http://www.davaosoft.com

Similar Threads

  1. Replies: 2
    Last Post: 4th June 2009, 16:09
  2. Replies: 5
    Last Post: 15th January 2009, 09:03
  3. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  4. Deploying App on Linux
    By janus in forum Installation and Deployment
    Replies: 5
    Last Post: 6th May 2008, 21:18

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.