Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22163

Visual Studio 2017 with the VS2015 toolset not detected correctly

    XMLWordPrintable

Details

    • Windows
    • d88fa6a0bed6d3c511558dfb02a27bd34b3e1684

    Description

      Root cause seems to be that Creator does not run

      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.0
      

      but

      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
      

      ,

      which breaks the configuration.

      -----------

      Original report follows:

      I am having a issue on QtCreator when trying to compile any target within the IDE. Note that this has normally worked finely for me, but I had this issue from time to time, and right now I do not know how to solve it.

      These are the tools I am using:

      • QtCreator 4.8.2
      • Visual Studio 2017 with the VS2015 toolset.
      • Ninja 1.8.2
      • Windows 10.

       

      I normally configure my CMake projects from the terminal and then I open them with QtCreator. Then I can build the projects from the IDE or the terminal flawlessly. However, this time, I can build the projects in the terminal either by using `ninja` or `cmake --build . --config Release` but when I try to compile on QtCreator I obtain errors like this:

      [1/16 12.9/sec] Linking CXX shared library _bin\logging.dll
      FAILED: _bin/logging.dll Lib/static/logging.lib 
      cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=libs\logging\CMakeFiles\logging.dir --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo libs\logging\CMakeFiles\logging.dir\Logger.cpp.obj libs\logging\CMakeFiles\logging.dir\cLogger.cpp.obj libs\logging\CMakeFiles\logging.dir\__\__\version.rc.res  /out:_bin\logging.dll /implib:Lib\static\logging.lib /pdb:_bin\logging.pdb /dll /version:1.7 /machine:x64 /WX /debug /INCREMENTAL -LIBPATH:D:\Dependencies\release\kissfft\lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
      RC Pass 1: command "rc /folibs\logging\CMakeFiles\logging.dir/manifest.res libs\logging\CMakeFiles\logging.dir/manifest.rc" failed (exit code 0) with the following output:
      The system cannot find the file specified
      ninja: build stopped: subcommand failed.
      09:44:12: The process "C:\Program Files\CMake\bin\cmake.exe" exited with code 1.
      Error while building/deploying project explore (kit: Qt 5.10 msvc2015_64 Ninja)
      

      I suspect the problem might be related with the "slashes". The CMAKE_RC_COMPILER variable is correctly set in the CMake cache file and as I mentioned before, the compilation from the command line works.

      Another (might relevant) thing I did recently in my system is to uninstall Visual Studio 2015 and install Visual Studio 2017 with the VS2015 toolset. 

      Please, let me know if I can provide any other piece of information that you might require to find a solution to this issue. 

      Attachments

        1. AutoDetectedVS14.jpg
          AutoDetectedVS14.jpg
          135 kB
        2. CustomVS14.jpg
          CustomVS14.jpg
          69 kB
        3. QtCreator_VSGenerator.png
          QtCreator_VSGenerator.png
          48 kB

        Issue Links

          Activity

            People

              owolff Oliver Wolff
              piponazo Luis Díaz Más
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: