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. Qt with Visual Studio 2017
Qt 6.11 is out! See what's new in the release blog

Qt with Visual Studio 2017

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 999 Views 2 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.
  • Y Offline
    Y Offline
    yabhishek
    wrote on last edited by
    #1

    I am trying to use Qcustoomplot in visual studio c++ by custom building. I am getting following error
    1>------ Build started: Project: Project5, Configuration: Debug Win32 ------
    1>Compiling qcustomplot.h using MOC
    1>moc: C:\Users\user\source\repos\Project5\qcustomplot.h -o C:\Users\user\source\repos\Project5\moc_qcustomplot.h: No such file
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.
    1>Done building project "Project5.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    qcustomplot.h is at the correct directory

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi and welcome to the forums.
      Does your visual studio work with a normal Qt project ?
      Im wondering if its setup to use moc.exe properly.

      A 1 Reply Last reply
      1
      • mrjjM mrjj

        hi and welcome to the forums.
        Does your visual studio work with a normal Qt project ?
        Im wondering if its setup to use moc.exe properly.

        A Offline
        A Offline
        Alain38 0
        wrote on last edited by
        #3

        Hi,
        With this kind of problem (I encounter it regularly), the best way is to open a command window and try to execute manually the comman moc C:\Users\user\source\repos\Project5\qcustomplot.h -o C:\Users\user\source\repos\Project5\moc_qcustomplot.h
        Unfortunately, calling Qt applications, like moc, under Visual only gives the result (fail or pass) without the error traces that are much more explicit.

        In every cases, even if it is not the case for you, I suggest that you change the props that contains the call to moc (and other functions). Because, regarding your traces, quotes around the file names seems to be missing. Thus, the day you will use a path with space inside, the command will systematically fail.

        1 Reply Last reply
        1
        • Y Offline
          Y Offline
          yabhishek
          wrote on last edited by
          #4

          thanks for the reply

          I made a mistake by typing moc_qcustomplot.h instead of moc_qcustomplot.cpp

          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