where should i add "-deviceemu" in SDK

i made a cuda program under the folder ‘project’ just like other examples SDK gave and modified the file ‘Makefile’ according to ‘simpleTemplates’, then i can correctly make my program and run it, but i want to debug it on CPU now, so i need compile my program using ‘-deviceemu’, it seem that i should add this option in the file ‘common/common.mk’, but i don’t know where i should add it, hope someone can give a tip

thanks in advance

To my knowledge you don’t have to modify your code in anyway. Just type make emu=1 or make dbg = 1 emu = 1

you ar right, the document CUDA_SDK_release_notes_linux_*.pdf also said how to build a project in different modes, i should read it first.

thanks a lot.

Hello, i have de same trouble, i have read “CUDA_SDK_release_notes_linux_2.0_08.pdf” , but i can’t find the solution.

can anybody help me, please?

read file called common.mk which is in NVIDIA_CUDA_SDK/common.

It’s the makefile. In line 209 you can read “emu” for emulation and in line107 for debugger.

Thanks, i had read it. i had to modify nothing. the problem was, i did not run ‘make dbg=1’ within the common folder, so i could not compile other things in this mode. :rolleyes: