Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Getting Xcode 4 to recompile Qt resources on Build?
Forum Updated to NodeBB v4.3 + New Features

Getting Xcode 4 to recompile Qt resources on Build?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VernJensen
    wrote on last edited by
    #1

    I'm on the Mac using Xcode. Qt resource files are not being re-compiled when I build the Xcode project, despite the fact that the qt_preprocess.mak file (in the Xcode project's package) already contains:

    compiler_rcc_make_all: qrc_megatest.cpp
    compiler_rcc_clean:
    -$(DEL_FILE) qrc_megatest.cpp
    qrc_megatest.cpp: megatest.qrc
    /Developer/Tools/Qt/rcc -name megatest megatest.qrc -o qrc_megatest.cpp

    and the Xcode project has a build step to "make" qt_preprocess.mak.

    I found however that I can get my resource to recompile by adding a specific build step as one of the Xcode project's build phases:

    rcc megatest.qrc -o qrc_megatest.cpp

    However, I have to build the project twice to get changes to the resource file to show up in the application. My guess is that this means that megatest.cpp is being compiled into object code prior to rcc rebuilding it.

    Questions:

    1. Why do I need to add my own build step "rcc megatest.qrc -o qrc_megatest.cpp" when the qt_preprocess.mak file seems to have code that looks like it should handle this already?

    2. How can I get resource file changes to show up after the first build, instead of requiring a second build? (I did already try moving the Build Phase both before and after the "Build Sources" build phase. No change.)

    -Vern

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved