Unresolved external symbol - building "hybridShadows"

Hi!

I can´t build the “hybridShadows” sample. When I try to build it, I get this errors:

5>hybridShadows.obj : error LNK2019: unresolved external symbol cgCreateContext referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetLastListing referenced in function "void __cdecl cgErrorCallback(void)" (?cgErrorCallback@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetParameterSettingMode referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetParameter1f referenced in function "void __cdecl init_scene(char const *)" (?init_scene@@YAXPEBD@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetParameter3f referenced in function "void __cdecl draw_scene(struct _CGtechnique * &)" (?draw_scene@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetParameter1i referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetError referenced in function "void __cdecl cgErrorCallback(void)" (?cgErrorCallback@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetErrorString referenced in function "void __cdecl cgErrorCallback(void)" (?cgErrorCallback@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetErrorCallback referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgCreateEffectFromFile referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetNamedTechnique referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetFirstPass referenced in function "void __cdecl draw_ground(struct _CGtechnique * &)" (?draw_ground@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetNextPass referenced in function "void __cdecl draw_ground(struct _CGtechnique * &)" (?draw_ground@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgSetPassState referenced in function "void __cdecl draw_ground(struct _CGtechnique * &)" (?draw_ground@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgResetPassState referenced in function "void __cdecl draw_ground(struct _CGtechnique * &)" (?draw_ground@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGetEffectParameterBySemantic referenced in function "void __cdecl getEffectParam(struct _CGeffect *,char const *,struct _CGparameter * *)" (?getEffectParam@@YAXPEAU_CGeffect@@PEBDPEAPEAU_CGparameter@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGLSetStateMatrixParameter referenced in function "void __cdecl draw_scene(struct _CGtechnique * &)" (?draw_scene@@YAXAEAPEAU_CGtechnique@@@Z)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGLSetTextureParameter referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGLRegisterStates referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)
5>hybridShadows.obj : error LNK2019: unresolved external symbol cgGLSetDebugMode referenced in function "void __cdecl init_gl(void)" (?init_gl@@YAXXZ)

Besides “isgReflections” and “isgShadows” doesn´t work.

Does anyone knows why I cant build this samples?

Info:

VB 2013 Community
Nvidia Optix 3.9
Cuda 7.5
CG toolkit 3.1

Windows 10 x64
NVIDIA TITAN X 12GB

That looks like the cg.lib has not been found. Have a look at the linker’s command line in the project’s properties or when generating the solution with CMake and see where it’s expecting it and fill in the correct location.

When generating the OptiX SDK examples solution, always use the top-most CMakeLists.txt file in CMake. Building solutions from the individual examples folders is going to miss the general setup of the solution.

More details please.
What exactly is the problem your seeing with either program?
Pre-compiled or self-built?
Do they find the Cg DLL?

Which display driver version are you running.