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. NMake fail with VARIADIC ! [Resolved]
QtWS25 Last Chance

NMake fail with VARIADIC ! [Resolved]

Scheduled Pinned Locked Moved Installation and Deployment
20 Posts 4 Posters 8.0k Views
  • 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.
  • S Offline
    S Offline
    Sawyer44
    wrote on last edited by
    #11

    I come back with still errors at building. Now, i use qt buil msvc2012 x64 and the error is the same. I really didn't know what is the fuck....

    I discovered a similar problem with boost inclusion in moc : http://qt-project.org/forums/viewthread/22993

    Console:
    @C:\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\bin\moc.exe -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_MULTIMEDIAWIDGETS_LIB -DQT_OPENGL_LIB -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"................\Program Files (x86)\Windows Kits\8.0\Include\um" -I"................\Program Files (x86)\Windows Kits\8.0\Include\shared" -I"................\Programmation-Files\Microsoft Visual Studio 11.0\VC\include" -I"................\Programmation-Files\VC\SFML-2.0-rc\include" -I"................\Programmation-Files\VC\OpenAL 1.1 SDK\include" -I"................\Programmation-Files\VC\libsndfile\include" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtMultimediaWidgets" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtOpenGL" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtMultimedia" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtWidgets" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtNetwork" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtGui" -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\include\QtCore" -I"debug" -I"." -I"." -I"................\Programmation-Files\VC\Qt5.0.2\5.0.2\msvc2012_64\mkspecs\win32-msvc2012" -D_MSC_VER=1700 -DWIN32 ..\TwiigCenter\Gui\Widget.hpp -o debug\moc_Widget.cpp
    C:/Programmation-Files/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156): Error: Macro argument mismatch.
    jom: C:\Users\Vincent\Dropbox\Personnal shared projects\AnimeProject\Dev\cpp\build-TwiigCenter-Desktop_Qt_5_0_2_MSVC2012_64bit-Debug\Makefile.Debug [debug\moc_Widget.cpp] Error 1
    jom: C:\Users\Vincent\Dropbox\Personnal shared projects\AnimeProject\Dev\cpp\build-TwiigCenter-Desktop_Qt_5_0_2_MSVC2012_64bit-Debug\Makefile [debug] Error 2
    19:21:38: Le processus "C:\Programmation-Files\VC\Qt5.0.2\Tools\QtCreator\bin\jom.exe" s'est terminé avec le code 2.
    Erreur lors de la compilation/déploiement du projet TwiigCenter (kit : Desktop Qt 5.0.2 MSVC2012 64bit)
    Lors de l'exécution de l'étape "Make"
    19:21:38: Elapsed time: 00:49.@

    It seems it is a VARIADIC problem ...

    any idea, i really have difficulties to solve the problem ....

    Thanks !

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sawyer44
      wrote on last edited by
      #12

      Hi,

      For people searching for a solution it's quite simple.
      I lost a lot of days ....

      So, i consider moc.exe is not compatible yet with VS2012 headers. (not all -> xrefwrap)
      The solution is to remove includes from HPP files for your class implementing Q_OBJECT macro.
      It avoid moc.exe to use includes... To do that properly, just use Q_MOC_RUN macro like this for example:
      @#ifndef Q_MOC_RUN
      #include <QObject>

      #include "AnimeBoxItemView.hpp"
      #include "../../Network/Models/AnimeModel.hpp"
      

      #endif@

      Then, juste relaunch builder and everything works....
      Good luck and thanks....

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

        Haaa... The worst is that i followed that boost thread but I completely forgot it... Sorry

        Great you could find a working solution !

        Don't forget to update the thread's title so other forum users may know that a solution has been found :)

        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
        • S Offline
          S Offline
          Sawyer44
          wrote on last edited by
          #14

          yes, i saw the boost thread too :p
          Thanks u anyway :)

          I update the title ...

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aenima1891
            wrote on last edited by
            #15

            I've the same problem: Error Macro Argumento Mismatch in xrefwrap file.
            I'm using Qt5.1.1 msvc2012 x64.

            I've understood that i must remove all msvc2012 headers (like <iostream>) from my QObject class headers. Is this correct?

            Can someone give me more explanations?

            Thanks!

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tiagocc0
              wrote on last edited by
              #16

              The issue is with the moc.exe file, in Qt 5.2 beta they have changed it from error to warning, so now you can compile.
              You can either upgrade to 5.2 or you can just get the moc.exe file and put it in the 5.1.1 bin folder like I did, it works.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aenima1891
                wrote on last edited by
                #17

                Thank you so much tiagocc0. It works!
                However, now I've 96 warnings "Macro argument mismatch" xrefwrap.
                I hope that Qt5.2 will solve this issue.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tiagocc0
                  wrote on last edited by
                  #18

                  The warnings will probably continue to occur since the moc code doesn't know much about VARIADIC, so it was probably making a wrong assumption that may be valid at some cases.

                  It is strange though because in my case this error started to appear after I changed my local profile to a domain profile with the help of an automatic profile exporter. So I must have something wrong like an environment variable or something that started to cause this issue.
                  It happens at work, but not at home.

                  It happened once too when I had Visual Studio 2010 and uninstalled it to install Visual Studio 2012, the exact same error, at the time I resolved the issue by reinstalling Windows, then just installing Visual Studio 2012 and the latest Qt at the time (5).

                  Unless you are using boost which is known to cause this issue.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    aenima1891
                    wrote on last edited by
                    #19

                    I'm not using boost.
                    I think you're right: this problem may be due by an environment variable. Infact, this happens at work but not at home to me too.
                    I'd like to know what's the cause of this issue...

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tiagocc0
                      wrote on last edited by
                      #20

                      This is a long shot but..

                      I don't have access to the registry here at work, I'm thinking this might be one of the issues since when I try to open the command line from MSVC 2012 it gives me an error, after analyzing the .bat files I noticed they use the reg.exe file to query the registry.
                      When I had my local account here at work I had full access to the registry and I lost it when I migrated to the domain account.
                      So it might not be Qt itself but rather MSVC that isn't properly configured.

                      Where you have the problem, do have access to use reg.exe or regedit.exe?

                      When I reinstalled Windows to resolve my issue I had also changed from domain account in Win7 to a local account in Win8.

                      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