CURAND Library - Compiling Error - Undefined reference to functions

前端 未结 2 1428
一个人的身影
一个人的身影 2021-01-13 11:58

I have the following code which I am trying to compile using nvcc.

Code:

#include 
#include 
#include 
         


        
相关标签:
2条回答
  • 2021-01-13 12:22

    The problem is not the header file, otherwise you would have got a compile error. You have a linker error. You will need to tell your linker where to find the object or library file that contains those functions.

    0 讨论(0)
  • 2021-01-13 12:26

    @Wilo Maldonado: just use a linker flag -lcurand and additionally -L/path/to/cuda/libs if you do not have it already

    0 讨论(0)
提交回复
热议问题