这里写自定义目录标题
##常见问题
- 构建了一个install工程,但是编译的时候并不能执行对应的编译文件,出现如下的错误:
8>------ 已启动生成: 项目: INSTALL, 配置: Release x64 ------ 8>-- Install
configuration: “Release” 8>-- Up-to-date:
8>-- Up-to-date:
D:/Software/CloudCompare2.11.3/CloudCompare-2.11.3/install/CloudCompare/expat.dll
8>CMake Error at qCC/cmake_install.cmake:64 (file): 8> file INSTALL
cannot find 8>
“D:/ThirdPartyLibraries-20210530/x64/vc15/bin/Release/libpq.dll”.
8>Call Stack (most recent call first): 8> cmake_install.cmake:44
(include) 8> 8>
8>C:\Program\MicrosoftVS2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5):
error MSB3073: 命令“setlocal
error MSB3073: D:\Software\cmake-3.14.5-win64-x64\bin\cmake.exe
-DBUILD_TYPE=Release -P cmake_install.cmake
error MSB3073: if %errorlevel% neq 0 goto :cmEnd
error MSB3073: :cmEnd
error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto
:cmDone
error MSB3073: :cmErrorLevel
8>C:\Program\MicrosoftVS2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5):
error MSB3073: exit /b %1
error MSB3073: :cmDone
error MSB3073: if %errorlevel% neq 0 goto :VCEnd
error MSB3073: :VCEnd”已退出,代码为 1。 8>已完成生成项目“INSTALL.vcxproj”的操作 - 失败。
遇到这种情况,不要慌,看似bug很多,其实不难发现其中只是个别文件出现了问题,具体出错的原因在于Install工程会将这些路径下的文件拷贝到提前设置好的install的路径下,一旦这些文件不存在就会终端Istall工程的编译导致失败,不是什么大问题。
解决方案:
- 要么直接将这些文件手动拷贝到你需要安装的路径;
- 检查这些路径是否真的存在,如果是那么需要将对应缺失的而文件拷贝到该路径下,使得下次同样的操作可以执行;
- 如果不存在,那么检查一下到底什么地方设置了这些文件,改掉即可。