Missing optix.1.dll / .lib in OptiX SDK 9.0.0 – Dynamic Linking Fails Unless I Manually Define g_optixFunctionTable_105 (original) (raw)

Hi all,

I’m developing an OptiX 9.0.0-based ray tracer on Windows using dynamic linking via optixInit(). Everything compiles fine, but at link time, I get an undefined symbol error:

undefined symbol: g_optixFunctionTable_105

To get past it, I temporarily defined this symbol myself:

OptixFunctionTable g_optixFunctionTable_105 = {};

Surprisingly, the app runs and optixInit() populates the function table correctly, but obviously this is more a hack than a proper solution.

Upon investigation, I noticed my OptiX SDK install (in C:/ProgramData/NVIDIA Corporation/OptiX SDK 9.0.0/) does not contain optix.1.dll or any .lib files (except glfw3dll.lib). I believe the dynamic loader expects one of these to be present to resolve the g_optixFunctionTable_* symbol.

My questions:

  1. Is this expected? Should the OptiX SDK ship with optix.1.dll or a .lib stub to satisfy linking?
  2. What’s the correct way to use dynamic linking with OptiX if optix.1.dll isn’t present?
  3. Should I manually copy the DLL from somewhere else (driver folder, another system)?
  4. Is my workaround dangerous or fragile?

Thanks in advance!

lspano April 16, 2025, 3:47pm 2

  1. Yes, expected. OptiX is a header only API since SDK version 7.0.0.
  2. The OptiX API entry point functions are loaded dynamically from the DLL shipping with the NVIDIA display drivers into that OptixFunctionTable structure. The SDK examples show how to load that specific DLL under Windows or Linux.
  3. No, the OptiX entry point DLL should be loaded from its original driver repository location in the OS.
  4. The OptiX function table definition needs to be filled with the entry points, so there needs to be one of these inside the program. There are different ways to handle that. The OptiX SDK example framework has a helper header with stub functions which lift the entry point API function names into the global namespace plus a header with the function table declaration which needs to be included exactly once. Other frameworks like the OptiX Advanced Samples (links in the sticky posts) use a class member variable instead.

You can actually find the same explanations and more details inside the related links below this thread.