When the cuda_test.cu
file is not included in the project, the code runs fine.
When such a file is included, I receive the following error message
mfcs100u.lib(dllmodul.obj) : error LNK2005: DllMain already defined in MSVCRT.lib(dllmain.obj)
cuda_test.c
u has the following header files, a global function and a wrapper.
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
So I am not sure what causes this problem.
After some research, it seems this problem is fairly common and has fixes. But this starts giving trouble in a different part of the code. ("StdAfx.h" is included in all .cpp files, if this information is relevant).
It is a huge project written in C++ and I am trying to parallelize some parts of it.
Some help will be hugely appreciated. I can give extra details if needed.