Hi everybody!
I have created a CUDA .dll file in Visual Studio 2010. I have the .lib file also.
Now I’m trying to call a function contained the .dll file from another code (the application code).
My application code is the following, it is very simple:
#include “stdafx.h”
#include <cuda_runtime_api.h>
__declspec(dllimport) void ForwardPropagation();
int _tmain(int argc, _TCHAR* argv)
{
printf("Calling main... \n");
ForwardPropagation();
printf("\nDONE! \n");
return 0;
}
When I try to compile it, it appears the following error in the output section in VS 2010:
1>cuda_vector_app.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) void __cdecl ForwardPropagation(void)” (_imp?ForwardPropagation@@YAXXZ) referenced in function wmain
1>C:\Users\Student3\Documents\cuda_vector_app_3\x64\Debug\cuda_vector_app.exe : fatal error LNK1120: 1 unresolved externals
I’m not sure why this error is appearing because I have implemented another code under the same premises and I don’t have problems with it. I don’t know why for this specific case the compilation presents this error.
All comments and suggestions will be appreciated.
Arturo V.