Separate compiling of C++ and CUDA - Doubt

Dear All

If I split C++ from CUDA in files and I compile separately and if I include a texture in the CUDA files.
How I declare that texture in the C++ files (like with extern, that seems do not work)?

Thanks

Luis Gonçalves

cuda texture objects generated with API calls from C++ code can be passed around between modules reliably. In my opinion this method should be prefered over old style texture references (mostly for performance reasons - and also because you can use a lot more of them in one kernel)

Old style texture references have to be declared in a .cu module as far as I know.

The accepted stackoverflow answer here seems to imply that sharing them between two compilation units is not possible in older CUDA code (pre CUDA 5.0), but supported with CUDA 5.0 and newer compilers when using relocatable compilation

https://stackoverflow.com/questions/12852416/cuda-extern-texture-declaration

Christian