1> Moc'ing data_interface.h...
1> The system cannot find the path specified.
1> Moc'ing AppLogAdapter.h...
1> The system cannot find the path specified.
1> Moc'ing CtpMarketDataSpi.h...
1> The system cannot find the path specified.
1> Moc'ing ctpfuturedataimpl.h...
1> The system cannot find the path specified.
1> d:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for '..\shared\interface\data_interface.h;..\shared\AppLogAdapter.h;CtpMarketDataSpi.h;ctpfuturedataimpl.h' exited with code 3.
1> The command exited with code 3.
1> Done executing task "CustomBuild" -- FAILED.
主要原因是QT VS tool没有为你设置 QTDIR,这个可以在 vs项目中include目录是否把QTDIR展开准确看出来。如果不准确,只要想vs项目 的 *.vcxproj.user 中加入QTDIR定义即可。
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>