diff --git a/bindgen/gen_odin.py b/bindgen/gen_odin.py index 497d756cf..45bb0364f 100644 --- a/bindgen/gen_odin.py +++ b/bindgen/gen_odin.py @@ -401,8 +401,13 @@ def gen_c_imports(inp, c_prefix, prefix): l( ' }') l( ' }') l( '} else when ODIN_OS == .Linux {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}') + l( ' when USE_DLL {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.so"{linux_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.so"{linux_gl_libs} }} }}') + l( ' } else {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}') + l( ' }') l( '} else {') l( ' #panic("This OS is currently not supported")') l( '}')