CUDA 11.8 Build issues --> MSB3721

Hi,

I am trying to build a CUDA library, while trying to build the library I’m getting MSB3721 error. This issue is very ambiguous, the issue is not occurring in one code but is occurring in a different code. The configurations of both the codes are same (even the code is same). I am using CUDA 11.8 with Visual studio 2022 and MSVC 2019 compiler for c++.

It would be really helpful if someone can help me resolve this issue, I am attaching both the solutions along with this post, along with the screenshots of the build outputs I got.

Thank you.


lib_gpu_neural_filters.zip (29.7 MB)
cuda_lib_test.zip (545.6 KB)

Hi, @manvanth.gs

CUDA11.8 is relative old. Can you please use the latest CUDA to build ? CUDA Toolkit 12.6 Update 2 Downloads | NVIDIA Developer

Also does it block your work because you mentioned one solution is OK, right ?

Hi veraj,

Thank you for your response,

retargeting to cuda 12.6 worked, However I tried to retarget to CUDA 12.4 earlier and that gave the same error as well.

I was using CUDA 11.8 because the code base was built on 11.8 and the problem shared here is a minimized version.

Thank you for your help, but I would still like to know why there is ambiguity, it would be great if you could help me with the reason so that in future such errors can be minimized.

Hi, @manvanth.gs

We tried CUDA 12.3. We can build successful. So 12.4 earlier statement may not accurate.

Hi,

I Faced the Issue again, This time I am using Visual studio 2022, with Visual studio 2019 build tools and CUDA 12.6 version.

However I am getting MSB error in one project but I am not getting MSB Error in the second one.

These are the contents of my vc++ Project file (both the vc++ Project files are identical which I verified using a difference checker).

<?xml version="1.0" encoding="utf-8"?> Debug x64 Release x64 {FC629092-2A8D-46AD-A58C-F84E53AB4992} LibGPUNeuralFilters 10.0 StaticLibrary true MultiByte v142 StaticLibrary false true MultiByte v142 true Level3 Disabled WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) $(SolutionDir);%(AdditionalIncludeDirectories);$(CudaToolkitIncludeDir) Default true Console cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 64 true true true compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86 Level3 MaxSpeed true true WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) $(SolutionDir);%(AdditionalIncludeDirectories);$(CudaToolkitIncludeDir) Default true true true Console cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 64 true true true compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86 This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.

It would be very helpful if you could help me resolve this.

Thank you,