About -deviceemu error

I wrote some cuda program.

I can compile them with the GPU mode, but I failed to compile them with option -deviceemu.

the error is :

nvcc -deviceemu -O3 -DPROTOTYPE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -lg2c -lcufft -c a3d3.cu 

/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/locale_classes.h(410): error: support for exception handling is disabled

/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/locale_classes.h(515): error: support for exception handling is disabled

2 errors detected in the compilation of "/tmp/tmpxft_00002c16_00000000-4_a3d3.cpp1.ii".

make: *** [frealign_v8.a(a3d3.o)] Error 255

why?

I define an struct and use it as global variable. Is it realated to that?

I’ve seen quite a few posts like this…

Some people suggest changing the --host-compilation flag, others suggest to be careful of the cAsE of your directory paths.

Hopefully some of the previous posts can help you:
http://www.google.com/search?q=site%3Aforu…+disabled"

sorry, I can’t open the above link.

can you give me another one?

thank you very much

Oops…guess the forum software switched the quotes in the link.

Just do a Google search for

http://www.google.com/search?q=site%3Aforu…ing+is+disabled

A couple of the results:

http://forums.nvidia.com/index.php?showtopic=71939

http://forums.nvidia.com/index.php?showtopic=41091

This two comments should help:

http://forums.nvidia.com/index.php?s=&…st&p=546369
http://forums.nvidia.com/index.php?s=&…st&p=549336

Device emulation with cuda 2.2 and c++ host code will not work. And device emulation gets probably removed sometime…