add .cu to existing MFC project

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!

No one replied yet? I am really stuck by this problem and cannot make any progress.
If somebody has experienced similar problem and solved it, or knows some clue, please help.
If my question is not clear enough, please indicate me.
I will really appreciate it!
Thank you!

The problem was solved, I shouldn’t add “stdafx.h” in .cu file, and it was actually not necessary. :)