LINK : fatal error LNK1104: impossible d'ouvrir le fichier 'shrUtils32.lib'

I translate project from VS 2010 to 2019 and the error occure:
LINK : fatal error LNK1104: impossible d’ouvrir le fichier ‘shrUtils32.lib’

Why ?

the other *.lib are in the same directory

The shrUtils32.lib is use for capabilyties of the Graphic’s card.

If I supress this lib, the following links errors occure:

Erreur LNK2019 symbole externe non résolu cudaLaunchKernel référencé dans la fonction “enum cudaError __cdecl cudaLaunchKernel(char const *,struct dim3,struct dim3,void * *,unsigned __int64,struct CUstream_st *)” (??$cudaLaunchKernel@D@@YA?AW4cudaError@@PEBDUdim3@@1PEAPEAX_KPEAUCUstream_st@@@Z)

Erreur LNK2019 symbole externe non résolu __cudaPushCallConfiguration référencé dans la fonction CUDA_Hello …
Erreur LNK2019 symbole externe non résolu __cudaPopCallConfiguration référencé dans la fonction “void __cdecl __device_stub__Z9HelloCUDAPci(char *,int)” (?__device_stub__Z9HelloCUDAPci@@YAXPEADH@Z) …

Erreur LNK2019 symbole externe non résolu __cudaRegisterFatBinaryEnd référencé dans la fonction “void __cdecl __nv_cudaEntityRegisterCallback(void * *)” (?__nv_cudaEntityRegisterCallback@@YAXPEAPEAX@Z) …

Erreur LNK2001 symbole externe non résolu __cudaRegisterFatBinaryEnd …

Erreur LNK2001 symbole externe non résolu __cudaRegisterFatBinaryEnd …

Why it’s working on VS 2010 and not in VS 2019 ?

Thank’s

  1. CUDA 32-bit support was dropped.

  2. shrUtils was a project included with older CUDA toolkits (included with older CUDA sample codes that accompanied older CUDA toolkits). Presumably when you updated your project from VS2010 to VS2019, you updated to a newer CUDA toolkit version. There is no suggestion to “fix” this. You should remove any dependency that your project has on shrUtils, and then delete that item from your link specification.

  3. Those other errors are not due to shrUtils.lib, but due to an improper linking to cudart.lib

I delete all link to shrUtils32.lib with deleting old “dépendence supplémentaire”
and replace thems by the new library:
cudart_static.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib

I take it from wizard project Cuda with Visual Studio.

My project use Cuda 10-1:
C/C++
other directory include
(CudaToolkitIncludeDir) A Directory for the DirectShow Lib ... CUDA C/C++ Common Additionnal Include Directories (CUDA_INC_PATH)
Editeur de lien
Général
Répertoire de Bibliothèques supplémentaires
$(CudaToolKitLibDir)
Entrée
Dépendance supplémentaires
cudart_static.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
Cuda Linker
Additionnal Library Directories
EMPTY

But now, all the files of my class *.obj occure an Link error (938 errors):

Génération de code en cours…

1> Création de la bibliothèque D:…\x64\Debug_Cover\Nadia.lib
et de l’objet D:…\x64\Debug_Cover\Nadia.exp
1>LINK : error LNK2001: symbole externe non résolu wWinMainCRTStartup
1>atls.lib(atlbase.obj) : error LNK2001: symbole externe non résolu atexit
1>libconcrtd.lib(Platform.obj) : error LNK2001: symbole externe non résolu atexit
1>stdafx.obj : error LNK2001: symbole externe non résolu atexit
1>cudart_static.lib(cudart_global.obj) : error LNK2001: symbole externe non résolu atexit
etc…

and Visual Studio completly was completly blocked for long time

What can I do ?

Hi,

I have found,
I use Microsoft API AND CUDA

I have now indicated correctly the library in use.

Thanks