$ nvcc projecto.cu -I/home/pinto/NVIDIA_CUDA_SDK/common/inc/ -L/home/pinto/NVIDIA_CUDA_SDK/lib -lglut -lcudart
/tmp/tmpxft_0000591e_00000000-12_projecto.o: In function `createVBO(unsigned int*)':
tmpxft_0000591e_00000000-11_projecto.ii:(.text+0x9dc0): undefined reference to `__glewGenBuffers'
tmpxft_0000591e_00000000-11_projecto.ii:(.text+0x9dd6): undefined reference to `__glewBindBuffer'
tmpxft_0000591e_00000000-11_projecto.ii:(.text+0x9df9): undefined reference to `__glewBufferData'
tmpxft_0000591e_00000000-11_projecto.ii:(.text+0x9e1e): undefined reference to `__glewBindBuffer'
collect2: ld returned 1 exit status
anyone knows why this happens? i have the same includes of simpleGL.
i’m using ubuntu 9.04 with cuda sdk and cuda toolkit 2.1
You have a conflict with the variable vbo. It is both a static global variable and an argument in createVBO(), and I am guessing the global definition takes precedence in the compilation unit, resulting in an attempt to deference an integer as a pointer.