0
votes

I am using Visual Studio 2010 environment and am trying to accelerate some of my previously written OpenCV algorithms with the help of CUDA. I have a separate .cu file that compiles fine individually in Visual Studio and my .cpp file also compiles fine individually.

But when I try to build the solution that contains both of these files I get an error as below:

error LNK2019: unresolved external symbol "void __cdecl ComputeBasisKernelWrapper(float *,float *,float *,float *,float *,float *,float *,float *,float *,int,int)"

ComputeBasisKernelWrapper is a function that is defined using extern "C" in the .cu file and is responsible for making the necessary CUDA allocations and carrying out parallel computations.

I have a similar framework that works fine where I use a non object-oriented .c file that makes calls to functions in a .cu file.

So, I am not sure whether I need to make some changes in the compilation settings or if something else is the issue.

Any help is appreciated.

1
I think I have fixed this problem by removing "extern". It compiles and builds fine now. - Sid
Maybe you can post what you did to fix it as an answer. Then we can call this question answered. Thanks. - Robert Crovella

1 Answers

1
votes

Fixed this problem by removing "extern".