Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.9.1
Description
I have Qt Creator 4.9.1 and some editions of MSVC on my machine. When I Build one application in my company with CMake + MSVC2017 through CMakelists.txt, the compilation fails because there is dependencies compiler with /MD but the main application appears being compiled with MDd, tough the config is Release (CMAKE_BUILD_TYPE is Release).
To solve that I set up the v141 toolset explicitly and cleaned CMAkeCache and CMakeFiles before the recompilation, to guarantee there is not any sign of older compilation and I chose rebuild the app.
But, indeed, with the changes a bizarre error is reported to me now by Qt Creator, avoiding starting the compilation process:
c:\User\...\productBuild.sln.metaproj : error MSB4126: A configura‡Æo da solu‡Æo especificada "Debug|x64" ‚ inv lida. Especifique uma configura‡Æo de solu‡Æo v lida com as propriedades Configuration e Platform (por exemplo, MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Qualquer CPU") ou deixe essas propriedades em branco para usar a configura‡Æo de solu‡Æo padrÆo. [C:\Users\edward.bos\pixeon_projects\build-arya-Qt_5_12_amd64_release-Release\AryaBuild.sln]
The translation of message that is in portugese with the wrong character encoding is:
The specified solution config "Debug|x64" is invalid. Please specify a valid configuration....
There was a message before this error when I was investigation the error that clearly was stating my toolset was v100 with a message from MSBuild pointing to a line of a MSVC XML file with something like that (The xml is different):
<If ReferencedToolset="vc100">Configuration not valid</If>
Using the normal command line and setting up msbuild on PATH the error does not happen. I had compiled the ALL_BUILD.vcproj generated by the CMake parsing and "make generation" using a command line akin to:
msbuild -p:PlatformToolset=v141,platform=x64 -t:rebuild
the compilation had ocurred successfully.
I also have tried:
cmake --build . --config Release
And the compilation also had finished with success.
What leaves me to the conclusion QtCeator is passing the wrong arguments to MS build.I imagine that are a bug when differente versions of Qt and MSVC exists, each with your proper kit:
This is my kit set up screen and I have send it just for reference purposes.