"HGPUNV" redefinition when adding optixpp_namespace.h

Hi, experts:
I tried to composite Optix with an OPENGL + CUDA project. However when I include optix header like this:

#include <optixu/optixpp_namespace.h>
using namespace optix;
#include <cuda.h>
#include <cuda_runtime.h>”

Compiler VS2013 said “include\gl\wglew.h(958): error C2371: ‘HGPUNV’ : redefinition; different basic types”

  • “optix_gl_interop.h(400) : see declaration of ‘HGPUNV’”.

If I only include optixpp_namespace.h, besides the previous error, it also said things like cudaIpcEventHandle_t or other cuda things were not defined. That’s the reason I added below.

I solved this thing by not include “GL/wglew.h”