nvcc Command Examples

The NVIDIA CUDA Compiler Driver. More information: https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc.

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}}

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-g|--debug]}} {{[-G|--device-debug]}}

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-I|--include-path]}} {{path/to/includes}} {{[-L|--library-path]}} {{path/to/library}} {{[-l|--library]}} {{library_name}}

nvcc {{path/to/source.cu}} {{[-o|--output-file]}} {{path/to/executable}} {{[-gencode|--generate-code]}} arch={{arch_name}},code={{gpu_code_name}}