OpenGL GLEW doesn't work with my nvcc code

I have a cuda cpp program which works nicely when I do not include glew.h
When I do include it the compiler throws errors like: error: “__glewGenBuffers” is ambiguous error: “__glewBindBuffer” is ambiguous error: “__glewBufferData” is ambiguous
These are pointing to code
glGenBuffers(2, vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo[0]);
glBufferData(GL_ARRAY_BUFFER, size, 0, GL_DYNAMIC_DRAW);

I need to use glew.h because I want to add a routine that uses these functions which are not
found without glew.h
ObjectStructs.cpp(89): error: identifier “glBindVertexArray” is undefined
ObjectStructs.cpp(98): error: identifier “glEnableVertexAttribArray” is undefined
ObjectStructs.cpp(103): error: identifier “glVertexAttribPointer” is undefined
ObjectStructs.cpp(129): error: identifier “glDisableVertexAttribArray” is undefined

Does nvcc use an old version of glew that doesn’t include these functions (or OpenGL earlier than version 3.0)?
My makefile is based on the example It produces this compilation line, which always includes the -lGLEW, but without the glew.h I suppose that doesn’t matter.

/usr/local/cuda/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -o mainpart mainpart.o libparticle.a -L/usr/lib/nvidia-compute-utils-440 -lGL -lGLU -lglut -lnetcdf_c++4 -lnetcdf -lGLEW