I am trying to execute a nvGRAPH cuda example:
https://docs.nvidia.com/cuda/nvgraph/index.html#nvgraph-trianglescounting-example
I saved it as triangle.cu and use my nvcc compiler
nvcc -o triangle triangle.cu
which yields
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0xcc): undefined reference to `nvgraphCreate'
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0x11d): undefined reference to `nvgraphCreateGraphDescr'
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0x1a1): undefined reference to `nvgraphSetGraphStructure'
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0x1fe): undefined reference to `nvgraphTriangleCount'
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0x273): undefined reference to `nvgraphDestroyGraphDescr'
tmpxft_00004f32_00000000-5_triangle.cudafe1.cpp:(.text+0x2bd): undefined reference to `nvgraphDestroy'
I think I installed nvgraph correctly as it is linked in ldconfig -p | grep cuda
libnvgraph.so.10 (libc6,x86-64) => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvgraph.so.10
libnvgraph.so (libc6,x86-64) => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvgraph.so