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

后端 未结 3 2161
眼角桃花
眼角桃花 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 10:44

    This is just a guess, but if this is visual studio, I've seen this case before when the code is in a .cu file that is #included. In that case it should not also be compiled as a source file. To avoid this, right click on one of the files (hard to tell which from your description) and select properties, and then find and check the "exclude from build" check box.

提交回复
热议问题