The goal is to link Nvidia CUDA to existing MFC application. We tried to link it ordinarily (include headers and call functions) and it gives LNK2019 error noted below:
Error 2 error LNK2019: unresolved external symbol “void __cdecl kernel(struct input *,struct output *)” (?single_kernel@@YAXPAUinput@@PAUoutput@@@Z) referenced in function _main C:\Users\user\Documents\Visual Studio 2017\Projects\GpuFilter\GpuFilter\Interface.obj GpuFilter
We tried also with
extern “C” __declspec(dllexport) void
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
with placing output in custom bin folder but it then gives also LNK2019 and LNK1120 errors.
is there any clear instructions how to link them?