OpenGL Interoperability with CUDA link error

I’m trying to display the output image after my cuda kernel execution, while getting openGL interoperability integrated into my cuda file, I have link errors for several functions.

1>kernel_PBO.cu.obj : error LNK2001: unresolved external symbol __glewBufferData
1>kernel_PBO.cu.obj : error LNK2001: unresolved external symbol __glewBindBuffer
1>kernel_PBO.cu.obj : error LNK2001: unresolved external symbol __glewGenBuffers
1>kernel_PBO.cu.obj : error LNK2001: unresolved external symbol __glewDeleteBuffers
1>C:\Users\212402580\Documents\Visual Studio 2010\Projects\test\x64\Debug\test.exe : fatal error LNK1120: 4 unresolved externals
1>
1>Build FAILED.

I have the following #includes:
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/freeglut.h>

and these additional dependencies for my project
freeglut.lib glew64.lib

I’m using cuda5.5 and support openGL4.2, windows7 64bit. I’ve been solving the problem since a few days, hope this forum will give me a final answer, thx a lot.

You may also need to add the path to the libraries (freeglut.lib, glew64.lib) that you added as dependencies to the project. There is a separate place to add these paths in the VS project settings. Take a look at one of the CUDA OpenGL sample projects to see an example. In fact you may want to verify that you can build one of the projects that uses CUDA/OpenGL PBO interop, and then perhaps just re-use that project structure for your code.