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.
I did it.
Files
easings.odin
andrlgl.odin
in same folder(vendor:raylib) were cause of error.To add //+build windows
easings.odin
andrlgl.odin
,the above build tags approach is working correctly.This is my final approach.I choose file suffixes approach.
game project.
main.odin