got error message while compiling

Hi all,

I got some error message when I compile cuda code.

/tmp/tmpxft_00006d3d_00000000-10.o: In function `main':

tmpxft_00006d3d_00000000-9.i:(.text+0x29): undefined reference to `__vla_alloc'

tmpxft_00006d3d_00000000-9.i:(.text+0x47): undefined reference to `__vla_alloc'

tmpxft_00006d3d_00000000-9.i:(.text+0x65): undefined reference to `__vla_alloc'

tmpxft_00006d3d_00000000-9.i:(.text+0x237): undefined reference to `__vla_dealloc'

tmpxft_00006d3d_00000000-9.i:(.text+0x240): undefined reference to `__vla_dealloc'

tmpxft_00006d3d_00000000-9.i:(.text+0x249): undefined reference to `__vla_dealloc'

collect2: ld returned 1 exit status

Thanks for your help.

If you are using VLA (= variable length array), that is not supported by CUDA for device code.

Thanks for your help.
I declare a constant length array and get error message no more.