Hi guys,
I am new to cuda, using cuda v4.0 and windows 7 (86). I already included cuda build rules, and set linkers like cudart.lib and cutil32D.lib.
I have no problem running example code cppIntegration.
But I have problem with adding a .cu file to my existing MFC program. The .cu file only have several lines:
#include “stdafx.h”
#include “math.h”
When I compiled .cu file with nvcc, it gives me this error:
fatal error C1189:#error: Building MFC application with /MD[d](CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use/MD[d].
For all .cpp file, the runtime library is MD/MD[d]. I set it same for .cu file.
And MFC is already in “shared dll” in both Release and Debug.
And I have to use MD/MD[d] for MFC, I also tried adding “#define _AFXDLL” in “stdafx.cpp” file before “#include stdafx.h”. It doesn’t help solve this problem.
Does anybody know what the problem would be?
Thank you very much!