[NVCC FATAL ERROR]

Hi,
I’m stuck in a compiling error:

Building NVCC (Device) object 
CMakeFiles/cuda_stuff_library.dir/__/__/__/src/obj_det/gpu/./cuda_stuff_library_generated_integr_detect.cu.o 
nvcc fatal   : A single input file is required for a non-link phase when an outputfile is specified
CMake Error at cuda_stuff_library_generated_integral_channels_detector.cu.o.cmake:198 (message):
Error generating

(cuda_stuff_library.a is a lib-file generated using cmake config “cuda_add_library”)

There’s no warning and remarkable little error message when Googling
My platform is Ubuntu12.04 with cuda 4.2.
Compiler: gcc-4.4 & gcc-4.6 (set to use v4.4)

Any help will be highly appreciated! Thank you in advance!

And where could I find the NVCC error message manual? Thanks! :)

It seems your build system is producing an incorrectly constructed command line (a syntax error, so to speak). Use the debug mode of your build systems to show the exact nvcc command line generated.

From the error message, it seems like your actual commandline would be something like

nvcc -o foo.o -c foo.c bar.c

that is, a non-link compilation (here: compilation only, -c) in which the output file is specified (here: -o foo.o), and where more that one input file is specified (here: foo.c bar.c). There are various possibilities as to what may have happened. Two possibilities I can think of are that the build system incorrectly specifies the source file more than once:

nvcc -o foo.o -c foo.c foo.c

or that there is a missing dash in front of a compiler option so that it looks like an input file to the compiler:

nvcc -o foo.o Xptxas -v foo.c

There are likely many more scenarios. Close inspection of the nvcc commandline should reveal what the problem is.

Thank you! I finally make it!
The fatal error maybe something like this(in cmake): add_definitions("-Dint_p_NULL=((int*)0)"
Thanks for your help! :)