Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling Qt codes for different versions using Visual Studio 2012
Forum Updated to NodeBB v4.3 + New Features

Compiling Qt codes for different versions using Visual Studio 2012

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 4 Posters 1.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.
  • R Offline
    R Offline
    Raveendra
    wrote on last edited by
    #1

    Hi,
    I m compiling Qt application code using Visual Studio 2012 with the help of Qt5 Visual studio Add-in 1.2.2.
    For compiling 64-bit i m using Qt5.0.1 library files and for compiling 32-bit application, i m using Qt 4.8.6 library files.
    I'm able to compile 32-bit application successfully. When i m trying to compile 64-bit application, Following errors encountered:

    "This file was generated using the moc from 4.8.6. It cannot be used with the include files from this version of Qt. The moc has changed too much"

    Why i m facing such errors ? is it possible to have different version of Qt Library files to compile qt application binaries ?
    How to troubleshoot this problem ?

    Kindly help me

    Thank You

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      You need to clean old build and re-run qmake and make.
      Another option would be to use separate directories for each build. One for 64 and another for 32.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sandy.martel
        wrote on last edited by
        #3

        Or maybe set different MOC_DIR for each version.
        You might also want to set ALL possible directory to a different value for each builds (OBJECTS_DIR, RCC_DIR, UI_DIR).

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          @_sandy.martel_: it's not a question of changing the output dirs, the correct version of moc must be run thus, Raveendra must ensure that the correct version of qmake is used when building in 64bit since it uses Qt 5.

          @_Raveendra_: One thing is puzzling me, why are you using two different series of Qt since the only difference between your builds seems to be the architecture ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Raveendra
            wrote on last edited by
            #5

            we have some requirement to use qt4.8 because it uses less size binaries to run the application.

            Is there any way to change the qmake version for moc ing using visual studio commands ?

            We use only visual studio to build the qt application with the help of qt visual studio add-in.

            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