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.
To add //+build windows and //+build wasm32 tags each files,the above file suffixes approach is working correctly.
This is my final approach.
game project.
main.odin