Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qmake don't use my ui_dir and rcc_dir with vs2010
Forum Updated to NodeBB v4.3 + New Features

Qmake don't use my ui_dir and rcc_dir with vs2010

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 3.2k 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.
  • D Offline
    D Offline
    dianyu
    wrote on 16 May 2012, 17:14 last edited by
    #1

    Hello,

    I'm using qt 4.8.0 with visual studio 2010 with the visual-addin. I generate my project in visual studio opening the .pro file with the visual studio throw the visual-addin. The problem is that the qmake uses the MOC_DIR, OBJECTS_DIR and DESTDIR that i have especified. But, with UI_DIR and RCC_DIR it doesn't happens. In the visual studio solution the folders that i have specified are inside a folder called Generated Files. The moc and obj files are placed in their corresponent folder, but ui and rcc intermediate files are NOT. They are duplicated, once in the folder that i have specified and once in the Generated Files folder. If i try to open the files that there are in the folder that i have specified VS can't find them. The others yes. If i go to the file system, the folders that i have specified are not created, and the intermediate ui and rcc files are inside a folder called GeneratedFiles.

    The problem is that VS does uic and rcc twice (once for the real intermediate files and another for the files that don't exists) and rcc fails... I have to delete the files placed in the folder that i have specified of the VS solution to make the solution work....

    I'm doing something wrong in the project files?? is this a bug???

    General.pri
    @
    #################################### CONFIG ############################################
    #Añadimos las configuraciones que utilizaran la mayor parte de librerias
    #Ver : (http://doc.qt.nokia.com/latest/qmake-project-files.html)

    #Mostrar todos los warnings
    CONFIG += warn_on

    #Permite compilar el proyecto en modo debug y release
    CONFIG += debug_and_release

    #La aplicacion necesita una consola
    CONFIG += console

    #La aplicacion usara Qt
    CONFIG += qt

    #Muestra en VS los archivos con su estructura jerarquica de carpetas
    CONFIG -= flat

    #Hay que definir que extensiones de qt no por defecto vendran
    QT += opengl

    ################################## DIRECTORIOS #########################################

    #Directorio donde se guardan los ficheros ui_*.h
    UI_DIR = ui_headers

    #En funcion de la configuracion se decide donde se almacenaram
    CONFIG(debug, debug|release){
    MOC_DIR = moc_debug
    OBJECTS_DIR = obj_debug
    RCC_DIR = resources_debug
    DESTDIR = ../bin/debug
    }CONFIG(release, debug|release){
    MOC_DIR = moc_release
    OBJECTS_DIR = obj_release
    RCC_DIR = resources_release
    DESTDIR = ../bin/release
    }

    #Añadimos las rutas donde buscara el compilador para buscar cabezeras
    INCLUDEPATH+= include ui ui_headers ../
    INCLUDEPATH+= src/ply
    unix{
    INCLUDEPATH+= /usr/include
    }

    win32{
    INCLUDEPATH+= ../glew/include
    }

    #Indica a qmake donde tiene que buscar dependencias, de esta manera si modificamos un .h
    #los .cpp que dependan de el seran recompilados
    DEPENDPATH += include ui src ../

    ########################################################################################

    Estructura de fichero de proyecto

    project.pro

    TEMPLATE = subdirs

    CONFIG +=ordered debug_and_release

    SUBDIRS += Libreria1 \

    ...

    @

    Project File
    @
    include (../general.pri)

    TEMPLATE = app
    LANGUAGE = C++
    TARGET = NightLighting

    SOURCES += src/main.cpp
    src/NightLighting.cpp
    src/ViewBCN.cpp
    src/SceneBCN.cpp
    src/TextureManagerBCN.cpp
    src/ModelLoaderBCN.cpp
    src/ObjectBCN.cpp
    src/ConfigurationTab.cpp

    HEADERS += include/NightLighting.h
    include/ViewBCN.h
    include/SceneBCN.h
    include/TextureManagerBCN.h
    include/ModelLoaderBCN.h
    include/ObjectBCN.h
    include/ConfigurationTab.h

    FORMS = ui/NightLighting.ui
    ui/Configuration.ui

    RESOURCES += resources/main.qrc

    CONFIG(debug, debug|release){
    LIBS += -L../bin/debug -lMath -lCore -lLoaders -lUtils
    }CONFIG(release, debug|release){
    LIBS += -L../bin/release -lMath -lCore -lLoaders -lUtils
    }

    unix{
    LIBS += -lGLEW
    }

    win32{
    LIBS += -L../glew/lib -lglew32
    }
    @

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gemmell
      wrote on 2 May 2013, 06:19 last edited by
      #2

      Same in 2012. Just generates to GeneratedFiles when I use:
      Debug:RCC_DIR = ../../Interface/Generated/Debug/rcc
      Debug:UI_DIR = ../../Interface/Generated/Debug/ui

      Which means that I have to have an additional INCLUDEPATH entry because it the visualstudio plugin/qmake ignores those values...

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dianyu
        wrote on 2 May 2013, 09:15 last edited by
        #3

        bq.
        Which means that I have to have an additional INCLUDEPATH entry because it the visualstudio plugin/qmake ignores those values…

        What does it means? Do you have any solution?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gemmell
          wrote on 2 May 2013, 11:21 last edited by
          #4

          Not a solution, a workaround.

          My pri now reads:
          @
          RELATIVEPATH = $$PWD/../..
          CONFIGURATION = Debug
          CONFIG(release,debug|release) {
          CONFIGURATION = Release
          }

          INCLUDEPATH *= $${RELATIVEPATH}/Implementation
          $${RELATIVEPATH}/Interface/Generated/$${CONFIGURATION}/ui
          $${RELATIVEPATH}/Interface/Generated/$${CONFIGURATION}/moc
          $${RELATIVEPATH}/Interface/Generated/$${CONFIGURATION}/rcc
          $${PWD}/GeneratedFiles #We need this because VS seems to ignore the Interface stuff and just whack it in GeneratedFiles
          @

          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