Really hoping someone can help me with this problem. I’m writing a ray-tracer in CUDA and need to debug my code. Please can someone tell me how to set up emulation/debug mode? As far as I’m aware it’s just adding the -emuDebug flag to the custom build step.
I’ve done this and am faced with errors. First one is when I run my program in emuDebug mode, it compiles fine and then I get the error:
“Cuda error: cudaD3D9RegisterResource (g_texture_2d) failed in file ‘.\CUDA Raytracer Test.cpp’ in line 83 : feature is not yet implemented.” wtf is this?! Please tell me this is fixable?
Ok, next I tried compiling in emuRelease and get multiple linker errors:
1>Linking...
1>CUDA Raytracer Test.obj : error LNK2019: unresolved external symbol _printf referenced in function _main
1>CUDA Raytracer Test.obj : error LNK2019: unresolved external symbol _memset referenced in function _main
1>cuda_code.obj : error LNK2001: unresolved external symbol _memset
1>CUDA Raytracer Test.obj : error LNK2001: unresolved external symbol __fltused
1>cuda_code.obj : error LNK2001: unresolved external symbol __fltused
1>hr_time.obj : error LNK2001: unresolved external symbol __fltused
1>CUDA Raytracer Test.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z)
1>CUDA Raytracer Test.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z)
1>cuda_code.obj : error LNK2019: unresolved external symbol __CIsqrt referenced in function _sqrtf
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>C:\Users\Sebastian\University Work\Ray Tracer 2008\CUDA Raytracer test\CUDA Raytracer test.exe : fatal error LNK1120: 7 unresolved externals
Anyone got any ideas on the above problems? I noticed in the D3D simple texture examples in the SDK examples dir, none of them had emuDebug or emuRelease setup, whilst all the other projects have.