using cmake to build a cuda project which using opencv, a static lib(.a) generated by matlab gpu coder to jetson nano. My qustion is why it show undefined referenced to ..
Mostrar comentarios más antiguos
I have give my CMAKE files and my build progress in error.txt
I want to deal the problem
tmpxft_00002e1f_00000000-5_img_to_3d.cudafe1.cpp:(.text+0x6b688): undefined reference to `cusolverDnDgesvd_bufferSize'
tmpxft_00002e1f_00000000-5_img_to_3d.cudafe1.cpp:(.text+0x6b720): undefined reference to `cusolverDnDgesvd'
tmpxft_00002e1f_00000000-5_img_to_3d.cudafe1.cpp:(.text+0x6bbd4): undefined reference to `cublasDdot_v2'
tmpxft_00002e1f_00000000-5_img_to_3d.cudafe1.cpp:(.text+0x6be1c): undefined reference to `cublasDdot_v2'
...
Respuestas (1)
Ram Kokku
el 3 de Feb. de 2024
0 votos
Hi Hailing,
I think this is due to missing cublas and cusolver libraries from the install. can you check you have libcublas.so and libcusolver.so files in /usr/local/cuda/lib64 directory. CMakefile seem to have the right settings, but compiler/linker is not able to resolve the symbols.
4 comentarios
Chao Luo
el 5 de Feb. de 2024
Can you try adding this to your CMakeLists.txt?
target_link_libraries(${PROJECT_NAME} cusolver, cublas)
CMake ${CUDA_LIBRARIES} does not contain cusolver and cublas.
hailing
el 6 de Feb. de 2024
Chao Luo
el 6 de Feb. de 2024
Seems you need to add another library, cudart.
Categorías
Más información sobre Get Started with GPU Coder en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
