How to switch import library by platform #3438
-
Hello,Thank you for awesome odin. when ODIN_BUILD_MODE == .Object {
import rl "../lib/raylib" // web build
} else {
import rl "vendor:raylib" // desktop build
} ODIN_BUILD_MODE flag is working correctly,but checker is called twice and because of two raylib have same name functions, Redeclaration of proc is occurred. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What you could do is use the
import rl "../lib/raylib" // web build
import rl "vendor:raylib" // desktop build |
Beta Was this translation helpful? Give feedback.
What you could do is use the
*_<platform>.odin
filename convention, i.e.rl_wasm.odin
rl_windows.odin