Build Problems __device__ __host__ Problems

I’m trying to take some existing code and port portions of it to Cuda. All functions run in the Cuda Kernel will also be shared on the host. So these functions require the device host directives. I add these directives to the functions in the .h and .cu files. When I do, I get the following:

nvcc -DHAVE_CONFIG_H -I. -I…/…/…/src/mpeg -I…/… -I…/…/…/src/support -O3 -g -arch=compute_20 -D__CUDA_ARCH__=200 -DMSI_IS_LINUX --compiler-options -Wno-format --compiler-options -Wimplicit-int --compiler-options -Wparentheses --compiler-options -Wreturn-type --compiler-options -Wsequence-point --compiler-options -Wswitch -DCUDA_PROCESSING --compiler-options -march=core2 --compiler-options -m64 --compiler-options -msse2 --compiler-options -mcx16 --compiler-options -msahf --compiler-options -pipe -D_DEBUG_ -D_DEBUG_PRINT_STDERR_NO_ -D_ARCH64_ -c …/…/…/src/mpeg/msiVideoMp4.c
In file included from …/…/…/src/mpeg/msiVideoMp4Freeze.h:24,
from …/…/…/src/mpeg/msiVideoMp4.h:15,
from …/…/…/src/mpeg/msiVideoMp4.c:8:
…/…/…/src/mpeg/msiVideoMp4Slice.h:648: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:650: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:653: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:654: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:701: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:704: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:707: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:708: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:714: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
…/…/…/src/mpeg/msiVideoMp4Slice.h:715: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘device
make[3]: *** [msiVideoMp4.o] Error 1

This is with Linux, Cuda 4.0 and a GT545 card, so compute capability 2.1, so it doesn’t have to inline functions.

Any ideas what I might be doing wrong?

Thanks,
Mike