Windows visual studio 2019 compile Video Codec SDK 12.1 faild, error MSB8066 custom generation of has exited with code 1

I have installed all the required SDKs, including cmake, cuda, Visual studio 2019, directX, Vulkan, FFMPEG LGPL, Agility, and the compilation commands are as follows:

Cmake - G “Visual Studio 16 2019” - A “x64” - DCMAKE_ BUILD_ TYPE=Release - DFFMPEG_ DIR=D:/ffmpeg-n4.4 latest win64 lgpl shared-4.4 DSKIP_ GL_ DEPENDENCY=TRUE - DSKIP_ GL_ DEPENDENCY=TRUE - DAGILITY_ SDK_ BIN=D: d3d build native bin x64- DAGILITY_ SDK_ VER=610- DCMAKE_ INSTALL_ PREFIX=

This step of compilation was successful, generating the NvCodec.sln file, but the step of generating the executable file failed

Cmake – build-- Target install – config Release

Continuously reporting errors error MSB8066 custom generation of has exited with code 1, Does anyone know what the reason is

Print as follows:
1>Checking Build System
Building Custom Rule D:/Video_Codec_SDK_12.1.14/Video_Codec_SDK_12.1.14/Samples/AppDecode/AppDec/CMakeLists.txt
AppDec.cpp
D:\Program Files\Nvidia\CUDA\v12.2\include\cuda.h(20651,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDec\AppDec.vcxproj]
D:\Program Files\Nvidia\CUDA\v12.2\include\cuda.h(21325,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDec\AppDec.vcxproj]
D:\ffmpeg-n4.4-latest-win64-lgpl-shared-4.4\include\libavutil\rational.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDec\AppDec.vcxproj]
NvDecoder.cpp
D:\Program Files\Nvidia\CUDA\v12.2\include\cuda.h(20651,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDec\AppDec.vcxproj]
D:\Program Files\Nvidia\CUDA\v12.2\include\cuda.h(21325,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDec\AppDec.vcxproj]
正在生成代码…
AppDec.vcxproj → D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\Release\AppDec.exe
Building NVCC (Device) object AppDecode/AppDecD3D/CMakeFiles/AppDecD3D.dir///Utils/Release/AppDecD3D_generated_ColorSpace.cu.obj
CMake Error at AppDecD3D_generated_ColorSpace.cu.obj.Release.cmake:220 (message):
Error generating
D:/Video_Codec_SDK_12.1.14/Video_Codec_SDK_12.1.14/Samples/Build/AppDecode/AppDecD3D/CMakeFiles/AppDecD3D.dir///Utils/Release/AppDecD3D_generated_ColorSpace.cu.obj

D:\Program Files\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: “D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Utils\ColorSpace.cu;D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Sampl
es\AppDecode\AppDecD3D\CMakeLists.txt”的自定义生成已退出,代码为 1。 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDecD3D\AppDecD3D.vcxproj]
Building NVCC (Device) object AppDecode/AppDecImageProvider/CMakeFiles/AppDecImageProvider.dir///Utils/Release/AppDecImageProvider_generated_ColorSpace.cu.obj
CMake Error at AppDecImageProvider_generated_ColorSpace.cu.obj.Release.cmake:220 (message):
Error generating
D:/Video_Codec_SDK_12.1.14/Video_Codec_SDK_12.1.14/Samples/Build/AppDecode/AppDecImageProvider/CMakeFiles/AppDecImageProvider.dir///Utils/Release/AppDecImageProvider_generated_ColorSpace.cu.obj

D:\Program Files\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: “D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Utils\ColorSpace.cu;D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Sampl
es\AppDecode\AppDecImageProvider\CMakeLists.txt”的自定义生成已退出,代码为 1。 [D:\Video_Codec_SDK_12.1.14\Video_Codec_SDK_12.1.14\Samples\Build\AppDecode\AppDecImageProvider\AppDecImageProvider.vcxproj]
Building Custom Rule D:/Video_Codec_SDK_12.1.14/Video_Codec_SDK_12.1.14/Samples/AppDecode/AppDecLowLatency/CMakeLists.txt
AppDecLowLatency.cpp

Hello @yawen-wang and welcome to the NVIDIA developer forums.

I can’t really help you directly, but my suspicion is that the issue is connected with your language/character settings or how your project folder is set up. It might be that there are some unsupported or illegal characters in the directory or naming structure.

Looking at

D:/Video_Codec_SDK_12.1.14/Video_Codec_SDK_12.1.14/Samples/Build/AppDecode/AppDecD3D/CMakeFiles/AppDecD3D.dir///Utils/Release/AppDecD3D_generated_ColorSpace.cu.obj

the part with AppDecD3D.dir///Utils looks particularly suspicious.

Maybe that points you in the right direction.

Thanks!

This is because of the format issue of my uploaded log. The actual log is shown in the following figure and txt file, and the file directory does exist


sdk_compile_log.txt (39.2 KB)