Can I use nvcc to compile .cu file with .cuh file?

I have tried to compile files with command: nvcc -ptx
In I have included file1.cuh. But the ptx file I get is empty with the following information only:
.version 5.0
.target sm_20
.address_size 64
So I can only move the codes in file1.cuh to Can I compile a, which include file1.cuh?

Yes, you can compile that way. There are various CUDA sample codes that demonstrate this. It’s impossible to identify what is happening in your case, based on what you have provided.