Optix6 with cuda10.0

I’m trying to compile the Optix-Samples but there are such a lot of errors.I use vs2013, cuda 10.0 and optix6.But the compiler always cannot find the declaration of rtBuffer ,RT_PROGRAM and etc. I have tried to add ‘using namespace optix;’ at the beginning, and the error of such as ‘float3’ has disappeared.I also try to add '#include <optix_cuda.h> at the beginning, the error of such as ‘RT_PROGRAM’ has disappeared. But the compiler still cannot find tex2D and so on. Now I think the problem is not about the lack of ‘.h’ but something else. I hope for some help.thanks.

Hi @user5782,

Have you used cmake to create your Visual Studio solution? Does it configure and generate without warnings or errors? What version of cmake are you using?


David.

Also please make sure to use the top-most CMakeLists.txt inside the OptiX SDK <version>/SDK folder as root of your solution. That sets up the environment for the whole set of OptiX SDK examples inside the solution, including the compilers and include directories you seem to be missing.
Using the CMakeLists.txt inside the individual OptiX SDK example folders will not work.

It’s generally recommended to use the most current OptiX SDK version for new developments, at this time that is OptiX SDK 7.3.0.
Note that the OptiX 7 API has been changed to a more modern, explicit API which is a lot more flexible and generally faster than the previous OptiX API used in versions 1 to 6.