Results 1 to 2 of 2

Thread: MOC, RCC & UIC on CodeBlocks

  1. #1
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default MOC, RCC & UIC on CodeBlocks

    I am using for many years CodeBlocks as my C++ projects environment.
    I started a Qt project, 3 months ago, but I don't want to use QtCreator or qmake. I want to keep using CodeBlocks.

    So, If someone here is using CodeBlocks, please lets give a try on these questions:

    Is there a way to run automatic, moc, rcc and uic and add automatic to project generated files? with CodeBlocks of course.

    If not:
    I use as my Qt project prebuild step these commands (Lots of lines stripped):
    moc.exe -o ./src/qt/moc_GLMainWidget.cpp ./src/GLMainWidget.h
    rcc -name resource ./src/resource.qrc -o ./src/qt/qrc_resource.cpp
    uic.exe -o ./src/qt/ui_QtMainWindow.h ./src/QtMainWindow.ui
    Why, when source file has older timestamp from target, compilation takes place?
    There are many Q_OBJECT, RCC and UI files and need a big amount of time.
    A workaround?

    PS: Thanks a lot. I know, my English sucks.

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

    Default Re: MOC, RCC & UIC on CodeBlocks

    Quote Originally Posted by chameleon View Post
    Why, when source file has older timestamp from target, compilation takes place?
    Why wouldn't it? It is make that decides whether the target is older than the source and does that only if you explicitely mark dependencies of some make rule. Other tools don't do such checks.

    There are many Q_OBJECT, RCC and UI files and need a big amount of time.
    A workaround?
    QMake This is the only tool that checks for existance of Q_OBJECT macros in header files and runs moc only for those files that need mocing. Without it you either have to run moc manually or run it on every header file.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. how config Codeblocks on linux ?
    By Skowroniasty in forum Newbie
    Replies: 3
    Last Post: 29th October 2010, 18:45
  2. about codeblocks
    By alban_gt in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2008, 11:53

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
  •  
Qt is a trademark of The Qt Company.