我尝试用Visual Studio 2017版本15.9.17用Qt VS Tools构建我的测试项目。它失败与uic错误。我在Windows 10上使用Qt 5.13.1。
错误描述:
Severity Code Description Project File Line Suppression State
Error 1 uic (C:\Qt\5.13.1\msvc2017\bin\uic.exe) TestAppVSEx ...\TestAppVSEx\testapp.ui 1构建输出:
1>------ Build started: Project: TestAppVSEx, Configuration: Debug Win32 ------
1>Generate moc_predefs.h
1>Uic'ing testapp.ui...
1>Moc'ing testapp.h...
1> Could not create output file
1>testapp.ui : error 1: uic (C:\Qt\5.13.1\msvc2017\bin\uic.exe)
1>Done building project "TestAppVSEx.vcxproj" -- FAILED.截图:

该测试项目使用Qt Creator运行良好。我很好奇,为什么它无法使用安装了VS 2017扩展的Qt VS Tools进行构建?这是带有最新VS 2017版本的VS 2017扩展错误吗?提前谢谢。
发布于 2019-11-06 20:14:04
我添加了$(IntDir)\uic\%(RelativeDir)作为输出目录。
截图:

现在它成功地编译了。谢谢。
https://stackoverflow.com/questions/58700064
复制相似问题