New to CUDA compiltion error

Dear all:

I am new to CUDA and trying to compile following program:

#include <stdio.h>

global void kernel (void) {


int main( void ) {

printf( "Hello, World!\n");

return 0;


I am getting the following errors:

compaq@ubuntu:~/CUDA/Programs$ nvcc error: expression must have integral or enum type error: expected an expression

2 errors detected in the compilation of “/tmp/tmpxft_00000b5d_00000000-4_example3.cpp1.ii”.

I am unable to figure out what is wrong here.



You should use

kernel <<<1, 1>>>();

triple braces

How stupid of me…I was looking at other stuff.

Thanks for the help.