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. Qt VS Tools environment corrupt? moc trying to compile .ui files
Forum Updated to NodeBB v4.3 + New Features

Qt VS Tools environment corrupt? moc trying to compile .ui files

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 2 Posters 655 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.
  • J Offline
    J Offline
    Jeff Barnes
    wrote on last edited by Jeff Barnes
    #1

    Environment: Windows 10 with Visual Studio 2019 Enterprise, Qt VS Tools 2.6.0 (rev.6) Qt Version 5.15.0, Azure Repository (git)

    What I did:
    Background
    I've been developing with Qt on Linux for 15 years. This year I had to use Windows/Visual Studio for an existing project. I was trying to do a MSBuild from the .sln on an Azure Devops environment. Welcome to the wild west!

    The problem: Building the .sln on Azure Dev Ops

    So I branched and googled to find answers for building the Qt dependent code from the .sln. The Azure Devops spins up a windows 10 vm pipeline to do the build. I installed Qt on the pipeline. I've seen articles describing how to run qmake, but I didn't want to do that because the .sln builds the Qt dependent code without a .pro/.pri. I haven't been able to find enough documentation to figure out how to do that on the Azure instance. So that's one thing I need.

    I don't want to have to copy the libs the .sln depends on to the .pri file. Too time consuming.

    I copied my %LOCALAPPDATA%\QtMsBuild directory to the project directory, added it to git and pushed to my topic branch. I switched over to the Azure DevOps instance and edited the pipeline to set the QtMsBuild variable. It didn't work.

    I decided to try to export to .pri and import it back into the project to see if that would prompt VS to set up the QtMsBuild so I could build it with MSBuild. The import failed with VS Complaining that "Key cannot be null
    Parameter name: key"

    And that's all.

    One of these actions caused builds in VS to start behaving badly. Now when I build, I get the following error.

    1> moc: Too many input files specified: 'acvpcapswizard.ui' 'AddArrayOrObjectForm.ui' ...

    First of all, why is moc trying to compile ui files? I thought it's job was to find the Q_OBJECT macro and compile _moc files. Isn't uic supposed to be compiling the .ui files?

    Second, when I switched back to dev branch, without any edits, I still get the same error.

    Have I somehow corrupted my Qt VS Tools environment? Can I fix this?

    Thanks for all help.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      karpouzi
      wrote on last edited by karpouzi
      #2

      I have this error suddenly after updating Qt VS Tools (2017) to v2.6.0. Everything was OK before. Anyone can help? Can I downgrade VS Tools to the older version?

      1> moc: Too many input files specified: 'D:\Long Path\controller.qrc' 'controller' 'default' 'D:\Long Path\src1.h'
      1> moc: Too many input files specified: 'D:\Long Path\controller.qrc' 'controller' 'default' 'D:\Long Path\controller.h'
      
      1 Reply Last reply
      0
      • K Offline
        K Offline
        karpouzi
        wrote on last edited by
        #3

        Update: downgraded to v2.5.2, problem solved.

        1 Reply Last reply
        1
        • J Offline
          J Offline
          Jeff Barnes
          wrote on last edited by
          #4

          Solved by updating Qt VS Tools to Qt VS Tools 2.6.0 (rev.7)

          1 Reply Last reply
          1
          • K Offline
            K Offline
            karpouzi
            wrote on last edited by karpouzi
            #5

            Updating to rev.7 fixed it for me also. Previous revision was broken.

            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