My cuSparse program worked correctly but after modifying it I've got a bunch of mistakes:
/tmp/tmpxft_000014cd_00000000-14_Sample2.0.o: In function `main':
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xb24): undefined reference to `cusparseCreate'
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xb68): undefined reference to `cusparseCreateMatDescr'
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xbb4): undefined reference to `cusparseSetMatType'
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xbc8): undefined reference to `cusparseSetMatIndexBase'
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xc60): undefined reference to `cusparseScsrmv_v2'
What does that mean? The function main() in the program became pretty messy. Can these mistakes be somehow connected with it? May be I should split the program into several parts?
The linker says it is missing definitions for these functions. Have you defined these functions? Are the names spelled correctly?
//jk