Cuda error: function has already been defined in another .cu.obj file

后端 未结 3 2012
眼角桃花
眼角桃花 2021-01-14 10:15

I am trying to compile a cuda project that someone sent me. Though the compile stage passes, the link stage is failing. Below is an example of the error:

Err         


        
3条回答
  •  时光说笑
    2021-01-14 11:05

    Looks like your decode_p4.cu 3level_1.cu include these function more than ones, focus on the file defining these function.

    Make sure to put the declarations in .cuh file (same as head file in c) and include the cuh instead of cu files, then check out the include guards.

    Good Luck, Bro!

提交回复
热议问题